<!DOCTYPE html> <html> <head> <title>Styling H1 Tags</title> <style> h1 { color: orange;…
- User
Modify the CSS style of this page so that the h1 tags are green and the li tags have a font size of 18px.
NOTE: CSS test cases may not be accurate when using the Firefox web browser. If CSS test cases do not pass when checking your code, try opening the exercises and testing your code in Chrome.
PassTestMessage Your code must have a style tagGreat! Your code must have an h1 tagGreat! All h1 tags must have the color "green"Try again! All li tags must have a font size of 18pxTry again!
- Assistant
Sure! Here's the modified HTML code with the updated CSS:
html<!DOCTYPE html> <html> <head> <title>Styling H1 Tags</title> <style> h1 { color: green; font-size: 35px; font-family: Helvetica; } li { font-size: 18px; } </style> </head> <body> <h1>My Favorite Animals</h1> <ul> <li>Chipmunks</li> <li>Penguins</li> <li>Horses</li> <li>Bees</li> <li>Whales</li> </ul> </body> </html>Explanation:
-
Changed the
colorproperty of theh1selector togreen:
-