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
In CSS3 which of the following selector is used to select and style when you place mouse over it? a. focus b. hover c. mouse d. all of the mentioned
In CSS3 which of the following element is used to create any shape that consists of only straight lines? a. <polyogn> b. <polyline> c. <lines> d. <multiline>
By using the program below: Kindly use CSS, Set the text color for the page to "red", and the text color for <h1> to "blue". <!DOCTYPE html> <html> <head> <style> </style> </head> <body>   <h1>This is a Heading</h1> <p>This is a paragraph.</p> <p>This is another paragraph.</p>   </body> </html>
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
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning