HTML CSS Exercise: Type selector
Solution:
HTML Code :
Explanation:
- The HTML document declares the document type and specifies the language as English.
- Character encoding is set to UTF-8 to support a wide range of characters.
- CSS is used to style the <h1> element using a type selector.
- The style rule sets the color of all <h1> elements to a specific shade of blue.
- The <h1> element in the body of the document displays text content.
Live Demo :
Supported browser
![]() |
![]() |
![]() |
![]() |
![]() |
Yes | Yes | Yes | Yes | Yes |
What is the difficulty level of this exercise?
Test your Programming skills with w3resource's quiz.