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 insert a comment in a CSS file?


Which is the correct CSS syntax?


Which HTML attribute is used to define inline styles?


Which HTML tag is used to define an internal style sheet?


Where in an HTML document is the correct place to refer to an external style sheet?