+ 8

Why do we use class="section" in the HTML?

9th Aug 2020, 1:27 AM
Anne
Anne - avatar
2 Réponses
+ 6
We use class or I'd to html elements so that the can get their unique identity just like you got your name And later this I'd or class value can be used to acces these elements in javascript or in css or anywhere in the document
9th Aug 2020, 2:23 AM
Ayush Kumar
Ayush Kumar - avatar
+ 4
The use of class and id will be not clear to you in html class. The unique identification through id and class is used to style the tag in css. When you will start css it will be much more clear to you there.
9th Aug 2020, 10:26 AM
Divya Mohan
Divya Mohan - avatar