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
Answered by Jamie C. HTML and CSS tutor

1533 Views

See similar HTML and CSS Mentoring tutors

Related HTML and CSS Mentoring answers

All answers ▸

What are main tags for text?


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


Simplify the brackets, (x+1)(x+2)


What's wrong with the following HTML markup: <p style"font-size:10px;">Copyright <span>2015</span></p>?


We're here to help

contact us iconContact usWhatsapp logoMessage us on Whatsapptelephone icon+44 (0) 203 773 6020
Facebook logoInstagram logoLinkedIn logo

© MyTutorWeb Ltd 2013–2025

Terms & Conditions|Privacy Policy
Cookie Preferences