Which background will be visible in the div box if the following html markup is given:

 <div class="square" style="background-color: red !important;">
and a CSS table is connected:

.square {
    width: 100px;
    height: 100px;
    background-image: url(img/square.jpg); /* picture size 100x100 pixels */
    background-color: black;
The div element has the same width and height as the picture has.
That's why the picture will cover black background totally.

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Keep exploring
HTML & CSS quizzes
Sign Up Now
or Subscribe for future quizzes