'background' Example : background « CSS Attributes and Javascript Style Properties « HTML CSS Reference






'background' Example

    
<html>
<head>
</head>
<body>
<div style="background:blue url(http://www.java2s.com/style/logo.png) repeat top left; 
            width:200; 
            border:3; 
            height:150; font-size:14">www.java2s.com</div>
            <br><br><br><br><br><br><br><br><br>
<div style="background-color:red; 
            width:200; 
            border:3; 
            height:150; 
            font-size:14">www.java2s.com</div>
</body>
</html>

    
      
      








Related examples in the same category

1.'background' Syntax and Note
2.'background' is applied to