Show how you would give all elements that have a class of 'class1', a green background.

.class1{ background-color: 'green'; } The full-stop before the text indicates that this css rule applies to a class with the name 'class1'.Inside the rule, the background-color attribute is given a value of 'green' which will give the class a green background colour.

JC

Related HTML and CSS Mentoring answers

All answers ▸

What is CSS used for?


how to code the details tag/ how to put a drop down option in a form?


What's the difference between por and para in Spanish?


How to go about designing a responsive HTML 5 website