CSS syntax

3 minutes
Share the link to this page
Copied
  Completed

Transcript

Today we are going to discuss about the CSS syntax. That means how CSS syntax works or how CSS works. So first of all, a CSS rule set consists of a selector and a declaration block, how far suppose you have your selector. And then you have your block. So you have your selector, you always have a block of code or declaration block. So how can you create your selected class is a selector or you can ask one is a selector, or P is a selector or is a selector.

So these are the selectors or HTML selectors. We will discuss about the class ID and HTML selectors in our later lectures, but Find out. You always write HTML. So this is the selector. That means you are hurting all the edge ones on your homepage and you are assigning the styling or you're adding some styling. So how can you add or the style?

Or How can you declare the block? First of all, you have your property, colon and your value. So this is your block. Okay? So you always use specific property and the value so this is the key pair well, so this is the key and this is the value. Don't worry, this is the property and this is the value.

So how can you write that first of all I'm saying Okay, so property and value, okay. Now, what is the property first of all is it in color color is property and what is the value I'm saying correct. You can also say green You can also say Black White is totally depend upon you, but for now, this is your selector. This is your property and this is your value. And from this curly braces to this curly braces, this is the the key. If you ration will allow, you can add multiple property and values by adding the column.

Or suppose this is the one property and value for suppose if I went if I'm going to add the playground playground is also a property and the value column where you have to add column and then your value forcible entry wide. That means I'm going to add two properties with one single element or on one single element. So it's totally depend upon you and your need for so hold off in your browsers the fire falls and type your shaggy dog calm. So now as you can see, it's currently showing the background color. So how is doing right click Inspect Element. Sorry, right click, and this is the inspect Inspect Element.

Now, so as you can see, it's showing us these are the values, okay? So in this way you can define your values on your page. So I think this is enough for today in the next lecture we are going to cover some basics on the CSS language

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.