Use img tag and CSS code to get the HTML webpage full screen background image. Another way is use background image CSS code. Examples of Html background image full screen Full-screen responsive background image example code.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 |
<!DOCTYPE html> <html> <head> <style type="text/css"> #bg { position: fixed; top: -50%; left: -50%; width: 200%; height: 200%; } #bg img { position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; min-width: 50%; min-height: 50%; } </style> </head> <body> <div id="bg"> <img src="bg.jpg" alt=""> </div> </body> </html> |
Output: Html background image full screen without CSS Well, if you don’t want to use an external or Read More…