CSS Multiple choices

Total available count: 25
Subject - Web Development
Subsubject - CSS

Which property is used to change the background color?







To set the background color in HTML, use the style attribute. The style attribute specifies an inline style for an element. The attribute is used with the HTML <body> tag, with the CSS property background-color. HTML5 do not support the <body> tag bg-color attribute, so the CSS style is used to add background color. The bg-color attribute deprecated in HTML5.

Just keep in mind that the usage of style attribute overrides any style set globally. It will override any style set in the HTML <style> tag or external style sheet.

You can try to run the following example code to set the background color in HTML,

<!DOCTYPE html>
     <title>Set HTML Backgorund Color</title>
  <body style="background-color:red;">
     <p>We have developed and make it live around 20 Courses and 5 tutorials till now in SlightBook.</p>


Next 5 multiple choice(s)


How do you add a background color for all <h1> elements?


Which CSS property is used to change the text color of an element?


Which CSS property controls the text size?


What are the correct CSS syntax for making all the <p> elements bold?


How do you display hyperlinks without an underline?