BCA SCHOOL
Programming Tutorials • Notes • Practical • Books
LATEST TUTORIALS

HTML Background Code

by BCA School

This article provides code for setting the background properties of an HTML element.
These examples use Cascading Style Sheets (CSS). Using CSS, you can set the background properties of any HTML element. Plus you can do things like, specify an image's position, whether it should repeat, how it should repeat etc.

code : 
<div style="background-color:GreenYellow;width:200px;border:1px solid black;padding:15px;">
<p>HTML background code is actually CSS!</p>
</div>