What's wrong with this code? It doesn't show me anything on the screen:
<!DOCTYPE HTML>
<head>
<title> CSS(lab2) </title>
<meta charset="UTF-8">
<style type = "text/css">
.bg {
background-image: url("charlesb.jpg");
background-color: green;
}
</style>
</head>
<body>
<div class= "bg">
</div>
</body>
div.bg(or fill it by text for test) and check the path to image.<div>is empty and therefore has no height and width. Set it explicitly.