-
Notifications
You must be signed in to change notification settings - Fork 0
Exercises (CSS): Webmaking with HTML and CSS
Jonathan edited this page Jun 19, 2023
·
5 revisions
selector { property: value; }Let's write some CSS rules to change the background color of some of our elements! First, create a style element (<style>...</style>) inside your head element. Then:
- Set the
headerelement'sbackground-colortomediumvioletred. - Set the
background-colorof yoursectionelements tolightgrey. - Set the
background-colorof yourmainelement togoldenrod.
- Follow the CSS syntax pattern:
selector { property: value; }. For task 1, this means: useheaderas theselector,background-coloras thepropertyandmediumvioletredas thevalue.
- Task 1 solution (the other tasks follow this pattern).
<style>
header { background-color: mediumvioletred; }
</style>