When I first learned HTML, it was a disaster. I tried to memorise all the different HTML tags, and I could never figure out why I kept getting so many validation errors .
I found myself asking questions like, why can’t a paragraph contain a list?
Which elements go together? How does HTML nesting even work?
My understanding changed completely after I relearned HTML properly last year and discovered content models.
In this article, we will explore three fundamental HTML concepts:
Semantics
Content categories
Content models
Semantics: Understanding Meaning
HTML is a markup language for describing the structure and meaning of a webpage.
The biggest shift is: instead of asking, “ What tag should I use ?”, we should ask, “ What does this content represent ?”
Understanding meaning makes choosing the appropriate HTML tag much easier.
Content Categories: What Kind of Element
HTML elements are grouped into content categories.…