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”.
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:
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?
Chapter 4 Solutions
Basics of Web Design: HTML5 & CSS3 (3rd Edition)
- In CSS3 which of the following element is used to create a SVG rectangle? a. <rectangle> b. <polygon> c. <rect> d. <square>arrow_forwardYou have a division with an ID = 'div0'. What JavaScript statement would allow you to change the CSS background color of that particular division to green? document.getElementById('div0').style.background-color='green'; document.getElementByName('div').backgroundColor='green'; document.getElementById('div0').style.backgroundColor='green'; document.getElementByClassname('div0').style.backgroundColor='green';arrow_forwardWhich of the following CSS properties could an object use to override alignment from its parent? A) align-content B) align-self C) justify-content D) text-alignarrow_forward
- 8.In CSS which of the following is used for spread radius? a. blur b. spread c. color d. v-offsetarrow_forwardWhich of the following is the correct syntax in CSS for adding a background color in HTML? a. <body background="yellow"> b. <body style="background-color:yellow"> c. <background color="yellow">text<background> d. <background>yellow</background>arrow_forwardIn CSS3 which of the following method increases or decreases the size of an element using tranform?a. rotate()b. scale()c. translate()d. matrix()arrow_forward
- Where is the screenshot of the output? The code I gave you was style.css. Here is the code again to take a look at and make sure to provide a screenshot of the output. style.css .toggle-switch { position: relative; display: inline-block; width: 60px; height: 34px; } .toggle-switch .switch-track { background-color: var(--mode-btn-bg); border-radius: 34px; display: block; height: 100%; width: 100%; position: absolute; transition: background-color 0.3s; } .toggle-switch .switch-thumb { background-color: var(--p-text); border-radius: 50%; width: 26px; height: 26px; position: absolute; top: 4px; left: 4px; transition: transform 0.3s, background-color 0.3s; } input[type="checkbox"]:checked+.toggle-switch .switch-track { margin: auto; background-color: var(--mode-btn-bg) } input[type="checkbox"]:checked+.toggle-switch .switch-thumb { transform: translateX(26px); } .toggle-switch+p::before { content: "Draw mode"; }…arrow_forwardPlease help me with this. I am not understanding what to do. So the code below is supposed to display images when the checkboxed are clicked and display nothing when they are unclicked,. Dont worry about the css code JS function p01Func() { document.getElementById("description").innerHTML = "<p>A mother joins an underground band of vigilantes to try to rescue her daughter from a state-run institution.</p>"; document.getElementById("poster").src = "images/night_raiders_poster.jpg"; document.getElementById("poster").style.display = "block"; document.getElementById("director").src = "images/night_raiders_director.jpg"; document.getElementById("director").style.display = "none"; document.getElementById("actors").src = "images/night_raiders_actors.jpg"; document.getElementById("actors").style.display = "none"; document.getElementById("check1").checked = false; document.getElementById("check2").checked = false; document.getElementById("check3").checked = false;}…arrow_forwardwhats the difference between the two CSS selectors? p .aaap.aaaarrow_forward
- Create a styles.css page and add the following styles? H1 Background color: #f03Border on the bottom with the following rules Width: thin Style: solid Color: #003 Centered textMargin on all sides: 35 pixels H2 Text color: #333, bold p Font: GeorgiaText color: #030Padding of 15 pixels on all sides li Font family: ArialBackground color: grayText color: black, boldText size: 18 points a Color for all hyperlinks: Dark red: #CC0000 Rollover color for all hyperlinks: Dark green: #060 One additional style of your choicearrow_forwardWhat is the difference between the following two CSS selectors? article particle>parrow_forwardUse the given code to answer the following questions: External.css label { color: darkgray; } home. Html <header> <link ref “stylesheet” type”text/css” href= “external .css” <style> Label { Color: darkblue; } </style> </header> <body style=”color: darkred;”> <p> <input type “checkbox” name =”chkOrange” <label style “color: darkcyan;” for = “chkOrange”>Oranges</label> </p> </body> Which color is shown for the < label> tag? Darkred Darkcyan Darkgray Darkbluearrow_forward
- EBK JAVA PROGRAMMINGComputer ScienceISBN:9781337671385Author:FARRELLPublisher:CENGAGE LEARNING - CONSIGNMENTNew Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage Learning