Multiple Declarations and Comments
A CSS comment is used to add explanatory notes to a block of code. How do you write these CSS comments? Oh, and how do you include multiple declarations in your CSS rules? We will see these in this lesson.
We'll cover the following...
Multiple Declarations in CSS
In its very simple form, a CSS rule is just this:
Press + to interact
h1 {background-color: red;}
Alright, thatâs fine. But you rarely define only one declaration in your code block. In a CSS rule, CODE BLOCK refers to everything between the curly braces { }
.
For a basic CSS rule, you may want to "make the color of an element become white, and the background color, green. i.e have multiple ...