Computer Applications
How do you add a background color for all <h1> elements?
CSS
3 Likes
Answer
We define a rule for <h1> tag and use the property background-color to set the background color for all h1 elements.
For example, to set the background color of all <H1> elements to blue, we define the rule as follows:
h1 { background-color : blue ; }
Answered By
2 Likes
Related Questions
What is the Cascading order of different style types ?
Where do you place the code to associate a Web page with an external style sheet ?
How do you display a border like this :
The top border = 10 pixels The bottom border = 5 pixels The left border = 20 pixels The right border = 1pixelHow do you make each word in a text start with a capital letter ?