To add styling to a HTML element, we need a few things.
Firstly, we need to tell the browser which element we want to style, we use a CSS
selector for this purpose. A
selector can refer to a single element or a group of elements. In this example we select an
h1 element to apply our styles to.
Then, we have to define our styles with a
rule declaration :
{color: red;} Each rule has to be followed by a semicolon.
Declaration consists of
property name and its'
value. In this case
color is a
property with
value of
red.
With this declaration, we apply a
red color to an
h1 element.
Whole declaration should look like this:
h1 { color : red; } Use this knowledge and set the color of the h1 tag to red.