Computer Science, asked by raaz81, 1 year ago

how do you add a background color for all <h1>element​

Answers

Answered by vaibhavtandon98
13

Answer:

h1{

background-color:black;

}

Answered by lovingheart
5

h1 {background-color:#FFFFFF}

h1 {background-color:colour-name}

This is basically a css syntax where h1 indicates the tag, background specifies the attribute for the tag and color-name specifies the value of the attribute. Color name can be given in number that is an hexadecimal value or the user can specify in normal English words like yellow, orange, cyan, blue etc.

Eg. h1 {background-color:yellow}

Similar questions