Want To Be A Blogger  →  Start A Blog  →  Increase Traffic  →  Make Money Online  →  Recommended Things

Full Page Background Image Using HTML And CSS

Thursday, Sep 28, 2017

Tags:- HTML CSS


In this tutorial we will show you how to add full page background image using HTML and css. We are going to replace the background of a webpage with the image.You may also like fullscreen background video using HTML5.


See Demo
Full Page Background Image Using HTML And CSS


To Add Full Page Background Image It Takes Only One Step:-

  1. Make a HTML file and define markup and styling


Step 1.Make a HTML file and define markup and styling

We make a HTML file and save it with a name image_background.html

<html>
<head>
<style>
body
{
 text-align:center;
 width:100%;
 margin:0 auto;
 padding:0px;
 font-family:helvetica;
 background-color:#81DAF5;

 background: url(images/image1.jpg) no-repeat center center fixed; 
 -webkit-background-size: cover;
 -moz-background-size: cover;
 -o-background-size: cover;
 background-size: cover;
}
#wrapper
{
 text-align:center;
 margin:0 auto;
 padding:0px;
 width:995px;
}
h1
{
 margin-top:150px;	
 color:white;
 font-size:45px;
}
</style>
</head>
<body>
<div id="wrapper">
 <h1>Full Page Background Image Using HTML And CSS TalkersCode.com</h1>
</div>
</body>
</html>

In this step we create a simple markup and use css background property to add image to body background.You may also like animated background using CSS3.



Thats all, this is how to add full page background image using HTML and CSS.You can customize this code further as per your requirement. And please feel free to give comments on this tutorial.

Subscribe Our Newsletter And Get Tutorials And Offers Via Email

About Me


Hello, My Name is Mudit Jain. I am a Web Developer, Professional Blogger and Digital Marketer from India. I am the founder of TalkersCode. I started this blog in february 2015 to help web developers & bloggers by providing easy and best tutorials, articles and offers for web developers and bloggers.