+ 3
What is the main difference between <div> and <class> in HTML?
2 Respostas
+ 5
There exists no element as <class>, but there is a global attribute class which is used to apply the same style to a group of elements.
On the other hand, the <div> element is a container for other elements. It's like a body within <body> and is generally used to define a division or section in a web page.
+ 5
Use div tag, there is no class tag.