3 ms·
This is hard work. It is also a variant of 'any fool can make things complicated, it requires genius to make things simple'. The HTML specs define the div as t
by Theodores 6y ago
This is hard work. It is also a variant of 'any fool can make things complicated, it requires genius to make things simple'.
The HTML specs define the div as the element of last resort, it has not been deleted from the spec but it really is supposed to be the last choice.
You can do it all with the new CSS Grid and pseudo elements, to never need a div. This does not mean swapping every div for a semantic element, defaulting to 'section' every time.
What I find sad is that the gurus of web design start blocking out their lorem ipsum examples with div elements. If they used real content they would be able to see what elements suited their content and use asides, navs, list items, figures and whatever else best suits.
Anyone preaching HTML and using div elements needs to be called out for it. There are no excuses, anything and everything can be refactored into sensible HTML that has a few classes and next to no div elements.
Time is the thing though. To refactor HTML to not use the mess of divs requires hard work, essentially it is a simplification of the code, actual real design which is not the same thing as decoration. Too often decoration is passed off as design whereas the innards of the page - the document structure and HTML - is essentially un-designed.
We are making artistic impressions of web pages and not the low carbon, well cached web pages we deserve.