Skip to content

Latest commit

 

History

History
 
 

5-css-selectors

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

CSS Selectors

There are no background colours applied to the messages in this example. Look closely at the HTML code for this example. Then open the message-backgrounds.css file and use CSS selectors for id, tag and class names to give each message a different background. Do not edit the index.html file.

  1. Give the first message a red background color.
  2. Give the second message a cadetblue background color.
  3. Give the third message a yellow background color.
  4. When you are finished, use git to add, commit and push your changes.

Hint: Each message has a unique id, tag or class name that you can use to only target that message.

If you are having trouble, review the Common CSS Selectors. You can find even more examples in this CSS Selectors guide.