Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis0
Div and id
For what "div" is here? Is it nesessary for "id"?
1 Resposta
+ 1
The "div" tag is nothing more than a container unit that encapsulates other page elements and divides the HTML document into sections. TheĀ idĀ attribute specifies a uniqueĀ id for anĀ HTML element (the value must be unique within theĀ HTMLĀ document). TheĀ idĀ attribute is most used to point to a style in a style sheet, and by JavaScript (via theĀ HTMLĀ DOM) to manipulate the element with the specificĀ id. and you don't need id in order to use div instead you can use class if you want to.