welcome everyone before going to see about today’s topic yesterday we have learned about HTML BLOCK and INLINE ELEMENTS that is how to create a div? how to give an inline element within a paragraph? i hope you understand this topic if you have any doubts comment below if anyone missed it the video is available in the description and i button in these class 18 we going to see about the topic HTML CLASSES why do they find this HTML CLASSES? we going to learn how to give this classes and how to use this ? first i tell you why they find out this classes let us assumes there are hundred headings you need to give same color for those headings you will give those color using css if you use inline css it will be so difficult if you give without the class you should specify it for each class its seems to be difficult to overcome this they find the class in these you just need to define class name only once for those 100 headings class name that you defined what yo mentioned in those class those will be appeared with colors let as open the program we have typed in the last class and so give as edit with notepad first i’m going to teach you about same class , that is which classes are should be same for example i create an div here i give a heading here also i give as INDIA IS MY COUNTRY now we have given , similarly in these i’m giving class just i create a class name as first why i’m giving class inside these div in these div whatever i given in the class what are attributes in the class will be appeared commonly in the div now let as see so in style i give as first i’m giving background color let it be blue now you can see the output total div is in blue color as total div is same class next we going to see about class inline so what is class inline? for example in these in this div i take the class then i give the class here so now you see the output now just India is my country alone appears in blue color you can see the output as background color is blue so i need the word India should have a background as red what should i do? just create an open tag and close tag for span after creating this span define the class here i give the background color as red if i am compiling it , the background color will be red in color so this is how the inline of class should be and now we going to learn how to specify the class? here you can see there is a word India i copy these and paste this for two times so now you can see here it appeared as India is my country i need to specify this India alone so specifying some particular element is said to be specified class , so now i just give for this alone i just copy this and paste it now India alone gets a background color, rather than using background color you can change even font size and so on next we going to see about multiple class what is multiple class? as i have given color as red here if so within one there is multiple classes here i have given the class as first the background color is blue similarly i’m giving 2nd class MULTIPLE CLASS so you can see so now you can see the background color is blue and the color of the word India appeared as red can i use same class in different tag? surely you can use it , in paragraph i’m going to use the same class so you can see for different tags i have used the same class this how you should use the class , mainly while using the class name should not be unique don’t give a common name i hope you like this video like , share ,comment and subscribe it

Add a Comment

Your email address will not be published. Required fields are marked *