CSS Multiple choices


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

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


 

 

 

 



C


Solution:-

CSS element,element Selector:

Definition and Usage:-

Style <h1> elements using background-color CSS property, if you want to apply for different elements then you will have to separate each element name with a comma and apply the style.

CSS Syntax:-

element, element { css declarations; }

Example:-

Select and style all <h1> elements AND all <p> elements:
h1, p { background-color: Red; }

 




Next 5 multiple choice(s)

1

Which property is used to change the background color?

2

How do you insert a comment in a CSS file?

3

Which is the correct CSS syntax?

4

Which HTML attribute is used to define inline styles?

5

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

Comments