Hacker News new | ask | show | jobs
by nilved 4666 days ago
I don't have any live right now, so you'll need to take my word when I say I'm been using semantic HTML for more than a decade (since I started coding.) My rules are no divs, no spans, no imgs (unless the image is part of the content rather than the presentation), no empty elements, no spacers, and no non-semantic classes or IDs. When you try it, remember that :after and :before give you the ability to add arbitrary content to a page, be it text or image.

If it sounds hard, remember that people said the same thing about making layouts without tables in the early 2000s. Semantic and compliant HTML means a more accessible website and that's more important than literally anything else in web development.