Explain why it is a good idea to use the background color, even if you have a background image.

What will be an ideal response?

It is a good coding practice to always use the background-color property when you use the background-image property, in case the background image is not large enough to cover the entire Web browser window. Select a background color that contrasts with the font color so the font is readable. That way, if the background image is not displayed, the text is still readable. When some browsers have problems displaying an image element, they show a placeholder icon instead of the image to alert you to the problem. However, if the background-image code contains an error, an image placeholder icon is not displayed. If you specify a background color for an element, the element's contents still appear against the background color even if there is an error in the image code. Also, specifying a background-color property overrides any default setting in the browser for background color, which usually is white. You should always set a background color, even if it is white. If you are using a background image for the body element, make sure your body text has a contrasting color, not a similar color.

Computer Science & Information Technology

You might also like to view...

Form objects should be placed in a logical order that will make sense to the user.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

You can tap the ALT + SHIFT + F keys to open the Format Cells dialog box.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology