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





Category:
Web Tutorial
Sub Category:
HTML Background Images
Uploaded by:
Admin


Read Article
https://develop.horje.com/learn/1434/reference