Flow content includes most things that appear in a page's body. Phrasing content is the smaller group used inside paragraphs and other text-focused areas. Sectioning elements divide topics.
What You Need to Know
These categories help determine where elements may be nested. Appearance under CSS does not change the HTML nesting rules.
Example: See It in Action
Add this example to the appropriate part of a practice HTML page. Read each line before you open the page in your browser.
This is a short HTML fragment. To try it as a webpage, put it inside the body element of a complete HTML document.
<main>
<article>
<h2>Astronomy</h2>
<p>Learn about <strong>stars</strong>.</p>
</article>
</main>
Let’s Understand the Example
- Main identifies the central content of the page; it should not be duplicated as separate visible main landmarks.
- Article marks a piece that could make sense on its own, such as a news post or recipe.
- An h2 starts a major section beneath the page topic.
You should see a readable heading and its related content. The heading level tells readers how the ideas fit together, not merely how large the letters look.
What Should You See?
The page should display “Astronomy” as a heading, followed by its related content. Change the heading text and refresh the browser to see the result.
Read only the headings, from top to bottom. Do they tell a sensible story? If not, move sections or choose levels that match the content.
Try It Yourself
- Find three phrasing elements and two flow containers in the example.
- Save your changes, open or refresh the page, and compare the result with the original example.
- Tell a friend what your change did. If you are not sure, undo it, refresh the page, and compare.
Common Beginner Mistakes
- Putting a section inside p because the CSS makes both appear inline.
- Avoid picking tags just for their default bold, italic or spaced appearance. Use CSS for presentation.
Key Takeaways
- Flow content includes most things that appear in a page's body.
- Main identifies the central content of the page; it should not be duplicated as separate visible main landmarks.
- These categories help determine where elements may be nested. Appearance under CSS does not change the HTML nesting rules.