CSS Property Value How to - background-image: url("http://placehold.it/20x20");








Question

We would like to know how to background-image: url("http://placehold.it/20x20");.

Answer


<html>
<head>
<style>
body {<!--  w  ww .j a v a 2  s  . c  om-->
    background-image: url("http://placehold.it/20x20");
    background-color:#cccccc;
    color:#000000;
    font-size:24px;
    font-weight:bold;
}
</style>  
</head>
<body>
    <p>This example illustrates the <b>background-image</b> property.</p>
</body>
</html>

The code above is rendered as follows: