Syntax of CSS | Learn CSS Syntax | CSS Syntax and Selectors | CSS Basic Syntax

In this video, we are going to tell you how to write syntax in CSS and we will understand the basic things of syntax and before writing syntax, it is important to tell you some points which you will have to use every time while using CSS. Look, first of all the CSS that you are seeing in front of you, there are some points of CSS like first selector, then declaration, then properties or now we see and understand these four, first of all let us tell you that these four in CSS. There are points, let us understand these points one by one. First of all, let us tell you that when you write CSS like this, then at the time of writing CSS, you normally take a tag here. After taking the tag, you put a bud brace.

Let’s open it and after closing it, now tell us here in the four points, the tags which are being used by you to select to connect to ATML, they will be called selectors, so it is necessary.

No, here P tag, here P can be heading, image can be border, any part of heading which can be A1, A2, A3, here P can be anything, after that, here P which can be written here inside the pearl braces. All these things are going to be called declaration and what are the things in the declaration, here there are two points, one is our properties, one is two values, so the colon that is visible here is the first thing that is written before the colon. It comes inside our property and the second one which is after the colon, what is this called value? Now let us understand it a little better, like see, here we have taken a table, the table is our tag, after that we go inside the calibration here.

If something is declared inside it, it declares, so these are called our declarations, so look at these two things are being called, that is, Palan is written inside the palan, which is on this left side here, what is on this side of ours, what is ours? Will be called property and everything that is being written here is not necessarily one thing, one tooth or whatever things are visible, what is all this being called value, after that we see a little apple like you selector declaration property.

How are these values used? Look at the real-life code while doing code. We have written some examples of CSS.

Okay, while writing CSS, you have to remember that after closing the style tag inside the style tag, we write all the things inside it. Like in our declaration here, we had mentioned the previous class here, the table and the previous class here, paragraph, so this is coming in the selector, see, this is coming in the selector, after that here we see like here. See, here the selector becomes h1, here it becomes a2, here pv, now how to know that this is a selector, we had already told that the curly braces open and curly braces close selector is what is the selector on which we want to apply the effect.

We want to put a heading, we want to put a paragraph, we want to put an image, we have to put a selector there, the selector can be anything, after that here you have to see two points in the declaration, the first is the property, the second is the value, so here But see, what is seen here in blue color is our property and what you see here is visible in light red color, what is ours, what is our value, so see here we had told earlier before the colon, before the colon.

Before the colon, we property, after the colon, after the colon, after the colon, these are our values, now we have explained this to you, we will understand them by coding them with an example because you will have to code further, so let’s go.

See, this is the output we have got through our normal HTML code, but with the help of some CSS, we have made them like this, so we have added normal effects, but what is the effect of this CSS, we have to give a little bit of color and a little bit of forming. Due to this, a little bit of designing has been done, let’s see how to do this, see in the auditor, we have written the CSS code from here till here, we have written the CSS code, so all the effects, we have got these things, after that we see this thing. How, first of all, CSS will work only when you have HTML codes written, so we see that we have written all the HTML codes inside the body, like see here there is a heading tag, then here we have written paragraphs.

After this we have taken heading and then here we have taken paragraph and then here we have taken heading so these are some codes of our ATM but if we want to use CSS on these then how will we do so see first of all you tell us like if we Let’s comment them, let’s comment here, forward slash with control, then see that the comment has been made, now let’s save the control, now go to our browser, if we refresh like this, what will happen if all the text of it will be removed, so now we will see. Let’s do a little practical, how first of all you have to come down here under the intermar, so here you have to see what we have to effect on, we have to do the formatting on it, let’s assume that this and we have a tag, our focus is on these only.

To do formatting, we write av here and after writing av, here we open and close the braces. Now inside these, what will we do, what will we declare, what will happen to you in the declaration, like we can see our texts.

What we have to do is we have to color them, so what do we have, we have to use the color property, we have the value in the color property, now what will be the value, which color do you want to keep, let’s say you want to keep blue color, then here But we have kept it blue, we will save it with control A, after that we go to our browser, we will refresh here, see that our color is done, then after that we look ahead here as if your mind is saying here, you will see the border on this. We want to put a border, okay, you can use it on the border, now after that we want to keep the border here so two pixels thick and our color should be ok, whatever our color is, it should be of red color, see here we have made the border.

We have made the pixels solid and here we have made the border red, we save the controls, go to the browser, refresh, a border has been placed on them, okay, then you see here, now what do you have to do, you are thinking that This text of ours is visible, if we want to bring these taxes to the center, then what do you have to do for that, here tax alignment is a property, here tax alignment is a property, we will use them, now what value do you have to give, where do you have to keep the center.

Now you write the center here, after writing, save the control, the center is done, see what has happened now, here we go ahead, you are thinking that our border is already placed but there is something in between it. Let’s give a color, let’s say we take one of our background colors, then our background color becomes property, after that what we want to do is make it green, okay, make it green, save control, go to the browser, control R.

Let’s see what’s inside our border, what’s inside our background, now here we have explained everything, so I hope you must have understood what we have highlighted, you can paste a paragraph, you can paste an image. Whatever big HTML you want, you can easily do it wherever you want. I hope you have understood that this is how we explained it in a simple way with examples in our class.

We will continue to explain it in the entire playlist if you want. If you want to learn from this then join our channel and follow us. We are sure that you will understand completely. Let’s meet in the next video. Take care.

System

https://dash.sparkloop.app/signup?aff=290086c5


Discover more from Making Money Is Easy

Subscribe to get the latest posts sent to your email.

About amorosbaeza1964

Hello, my name is Jose Amorós first of all I wish you a warm welcome to my blogs. It will be a pleasure to share with all of you information about my career and thus evaluate knowledge that will be beneficial for both of us. If you wish, you can contact us through the form, thank you!
This entry was posted in Computer Networks and tagged , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply