What is html I'd and class ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is html I'd and class ?

Pls help me. And full explain

27th Nov 2021, 3:05 PM
ABIR DAS
ABIR DAS - avatar
3 Answers
27th Nov 2021, 4:53 PM
Simon Sauter
Simon Sauter - avatar
+ 5
The HTML class attribute specifies one or more class names for an element Classes are used by CSS and JavaScript to select and access specific elements The class attribute can be used on any HTML element The class name is case sensitive Different HTML elements can point to the same class name JavaScript can access elements with a specific class name with the getElementsByClassName() method The id attribute is used to specify a unique id for an HTML element The value of the id attribute must be unique within the HTML document The id attribute is used by CSS and JavaScript to style/select a specific element The value of the id attribute is case sensitive The id attribute is also used to create HTML bookmarks JavaScript can access an element with a specific id with the getElementById() method (Quoted from W3school) BTW W3schools has a lot of ressources about HTML. Please look at it.
27th Nov 2021, 5:23 PM
JTLZ