0
What is Id and class name?
javascript
3 Respuestas
0
you can give an html element (a, p, body, div, span , etc) an ID and/or (a) class(es).
<div id="myID" class="class1 class2 class3">
you use the Ids and classes in css and js to modify the look/behavior of given elements.
0
ID is only used for a div in part, a single div like <p id = "unico-Paragrafo> only this paragraph will contain this style </ p> already when using the class is used when styling various components containing The class name embedded as <p class = "k1"> kkkk </ p> <b class = "k1"> kkkk </ b> all that contains this class will be stylized in the same way.
0
id and class are just attributes that we assign to the html tags