Basics of Web Design: HTML5 & CSS3 (3rd Edition)
Basics of Web Design: HTML5 & CSS3 (3rd Edition)
3rd Edition
ISBN: 9780133970746
Author: Terry Felke-Morris, Terry Morris
Publisher: PEARSON
Expert Solution & Answer
Book Icon
Chapter 4, Problem 1RQ
Program Description Answer

The “background-color” is a Cascading Style Sheet (CSS) property, which is used to set the background color of a web page.

Hence, the correct answer is option “D”.

Expert Solution & Answer
Check Mark

Explanation of Solution

Cascading Style Sheets (CSS):

Cascading Style Sheet is a computer language that is used to present the document written in a mark-up language like HTML, MXML, and AIML.

Background Color:

  • • The background-color describes the background color of an element.
  • • With CSS, a color is often specified as a valid color name, a RGB value or a hex value.

Example Program:

<html>

<head>

<style>

body

{

    background-color: lightgreen;

}

</style>

</head>

<body>

<h1>Hello World!</h1>

<p>This page has a light green background color!</p>

</body>

</html>

Output:

Basics of Web Design: HTML5 & CSS3 (3rd Edition), Chapter 4, Problem 1RQ

In the above HTML code, the background color is assigned within the body section of the code.

  • • The “background-color” is set as light green.
  • • The sample heading of the webpage is given as “Hello World” and the paragraph is written as “This page has a light green background color”.

Explanation for incorrect options:

bgcolor:

The attribute “bgcolor” is used to set the background color for HTML elements.

Hence, the option “A” is wrong.

color:

The property “color” is used to specify the color of a text.

Hence, the option “B” is wrong.

bcolor:

There is no property named “bcolor.

Hence, the option “C” is wrong.

Want to see more full solutions like this?

Subscribe now to access step-by-step solutions to millions of textbook problems written by subject matter experts!
Students have asked these similar questions
You view a web page and watch an element expand in size and move upward as you roll over it with your mouse pointer. If this animation was created using the jQuery library, then these effects were achieved by gradually changing the values of several CSS properties for the element. Select one: True False
I believe I am close to having this correct but would like to check.   Write the CSS to configure a grid for an id named container that has two columns and two rows. The first row is 100 pixels high. The first grid item in the second row takes up 75% of the width.
Write a sample code for The CSS class Selector
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
  • Text book image
    EBK JAVA PROGRAMMING
    Computer Science
    ISBN:9781337671385
    Author:FARRELL
    Publisher:CENGAGE LEARNING - CONSIGNMENT
Text book image
EBK JAVA PROGRAMMING
Computer Science
ISBN:9781337671385
Author:FARRELL
Publisher:CENGAGE LEARNING - CONSIGNMENT