Finally, finally, it's time for us to get into writing, of course.
But before we get into that, let us learn the syntax of writing CSS.
And it goes like this.
Let's break down this one into pieces.
The first one is called The Selector.
The selector is used to select the HTML element that you want to style.
This can be any HTML element like p tag Dave attack and others.
And we often use some identifiers and that is the class names or the IDs.
But for the meantime, understand that the selector is used to select a particular HTML element to style.
Let me show you with this code.
That is where we.
Let me show you this code.
That is some.
Let me use this sample HTML code to show you over here.
You can see that there are some elements going on here and that is the H1.
So we can style this particular tag or content by using the element.
Let's say I want to change the color of this one to red to be able to apply the CSS, I need to target
the style.
This what we call the selector, which is this one.
Then after that, we have what is called the decoration block.
We start with these braces here.
The decreasing block contains one or more decorations enclosed in the curly braces.
So after the block here, we have key value pair.
This is what we call the decorations.
Each declaration includes CSS, property name and value separated by colon, as we see here.
So this is what we call the property name.
Their property name.
Specify how we are going to style.
For example, if you look at this H1, we have some properties.
Let's say that I want to change the color.
The color here is the property.
I want to increase the font.
The font.
Here is the property.
I want to change the background color.
The background color is the property.
Then we go on to the value.
Meaning that if I want to increase the font for this text, for example, the H1, what will be the
value?
And I can say that I want to increase the font size to 20 pixels or 30 or 50.
So 50 here is the value for this CSS property name.
In short, this is how we write CSS.
The first one is the selector.
The property name and then the value.
Now that we know the syntax of writing CSS, let's continue in the next video.