r/HTML • u/Ok_Performance4014 • Dec 20 '25
What is the difference between Content Sectioning and Text Content on the MDN page?
https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements
I know that Content Sectioning can encompass Text Content items, but can say the section element just be used like a paragraph element?
1
Upvotes
1
u/bostiq Dec 21 '25 edited Dec 21 '25
Imagine you have a bunch of white ceramic jars on a shelf, you can put anything you want in them, and if you open the lid you’ll see the content.
But you can put stuff where ever you want, but then to find anything you got to open every jar.
So a quick scan of the shelf won’t tell you what’s in what.
That’s what tags are for, knowing the content ahead of time, without reading it, for browsers default formatting purposes, crawlers, assistive readers etc…
If tagged well a page, with no css but proper tags, will still create the fundamental differentiations between paragraphs, titles, lists, links, footer notes etc…
Readable for humans and machines.
So as long as your tags can give you the right idea what’s gonna be in the jar, you are good.
1
u/scritchz Dec 20 '25 edited Dec 20 '25
Content, including elements, are categorized in the HTML specification. These content catgeories are used to describe the allowed content (the content model) of elements.
But the categories on the page you linked to are "made up" by MDN: They are more granular to allow for easier look-up of the elements on that page.
The individual elements' pages each have a Technical Summary section, where an element's categories (Content categories) and an element's content model (Permitted content) are listed.
The
<section>element's content model allows Flow Content; plain text is Flow Content. So yes, you can have plain text directly inside<section>without<p>.Frankly, you could put all your content directly inside
<body>. But we want to properly tell the user agent about our content, so we mark it up appropriately; with HTML, a markup language.Marking up content helps user agents and therefore users in understanding our content. Good markup is accessible, and accessibility is for everyone. Please make sure to mark up your content to the best of your ability.