Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
The following explanation corresponds to the latest W3C specification for HTML5, and a bit of my notes: The <div> element is a SECTIONING element, equivalent to the <span> element in text-level semantics. It has no meaning at all, and authors are encouraged to use it as an element of LAST RESORT. It can be paired with the class, lang or title attributes. The use of more appropriate elements instead of <div> (such as <article>, <section>, <header>, <footer>, <nav>, etc.) leads to better accessibility for readers and easier maintainability for authors. Also, this element has been abused in previous versions of HTML, and it is still employed as a "box" around which styling can be applied. So, it ends up being used only for styling purposes. HOWEVER, there will always be a trade-off between SEMANTIC PURITY and AESTHETICS.
25th Dec 2016, 7:55 AM
Hyper Late Night Code
Hyper Late Night Code - avatar