Horje
How to add HTML Background Image on Full Page

If you want the entire page to have a background image, you must specify the background image on the <body> element:


Full Example of HTML Background Image on Full Page

Add a background image for the entire page:
index.html
Example: HTML
<!DOCTYPE html>
<html>
<head>
<style>
body {
  background-image: url('https://itupto.com/uploads/demo/2023-09-09-13-56-16-untitled.png');
}
</style>
</head>
<body>

<h2>Background Image</h2>

<p>By default, the background image will repeat itself if it is smaller than the element where it is specified, in this case the body element.</p>

</body>
</html>

Output should be:

Full Example of HTML Background Image on Full Page





Related Articles
What is HTML Background Images HTML Background Images
How to create Background Image with HTML Style HTML Background Images
How to create Background Image with CSS Style HTML Background Images
How to add HTML Background Image on Full Page HTML Background Images
How to create HTML Background Repeat HTML Background Images
How to create HTML Background with no Repeat HTML Background Images
How to add HTML Background Cover with CSS HTML Background Images
How to create HTML Background Stretch HTML Background Images

Single Articles
Full Example of HTML Background Image on Full PageHTML Background Images

Read Full:
HTML Background Images
Category:
Web Tutorial
Sub Category:
HTML Background Images
Uploaded:
1 year ago
Uploaded by:
Admin
Views:
47


Reffered: https://www.w3schools.com/html/tryit.asp?filename=tryhtml_images_background5

Share on: