Do you want to be a good Web Developer?

Enter Your Email To Get Our Exclusive Tutorials
And Offer Right In Your Email

Join TalkersCode Community And Recieve Exclusive Tutorials
On Web Development Right Via Email.

Full Page Background Image Using HTML And CSS

Sunday, Jan 1, 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.

Join Us With Our 21000+ Subscribers And Get Our Latest Tutorials Update Via Email