+ 1
Div tags id's and class attributes.
Hello, please Why must we use the div tags and id's and class attributes when writing code even though they make the code look complex... Please why is it important? Thanks in advance.
3 odpowiedzi
+ 7
When you want to style or embed some js code to a specific div section in your html document, the id or class attribs must be there, they are not there to make the code complex, they just serve as unique identifiers to each div section in your document
Styling a div section with
id attrib: # is used
class attrib: . is used
Embeding js code to a div with:
id attrib: getElementById() method is used
class atrrib: getElementByClass() is used
Happy coding😉 Keep coding 🙏🏾
+ 3
try searching here, in the questions and answers, using the search for the phrase "div". because the language barrier prevents me from answering your question. English speaking users have already responded many times
+ 1
Thanks a lot. I appreciate