Applying CSS To HTML Documents: IP Lab Manual Three
Applying CSS To HTML Documents: IP Lab Manual Three
Page | 2
IP lab Manual Three 2017
Background property
Set the background color
<HTML>
<HEAD>
<style type="text/css">
body
{
background-color:brown;
}
h1{background-color: #00ff00}
h2{background-color: transparent}
p{background-color: rgb(250,0,255)}
</style>
</HEAD>
<body>
<h1>welcome</h1>
<p>DBU school of computing</p>
</body>
</HTML>
Set an image as the background color
<HTML>
<HEAD>
<style type="text/css">
body
{
background-image:URL(a.png);
background-repeat:no-repeat;
}
</style>
</HEAD>
<body>
<h1>welcome</h1>
<p>DBU school of computing</p>
</body></HTML>
Page | 3