All subjects · Information Technology · WIT12 3 hour practical exam on web development with HTML, CSS and JavaScript
Semantic markup: structural elements, div and span
Edexcel IAL Information Technology · WIT12 3 hour practical exam on web development with HTML, CSS and JavaScript
Semantic markup describes what content **is**, not how it looks. Browsers, assistive technologies and search engines use that meaning (spec 11.1.1 to 11.1.3). Exam pages expect header, nav and footer elements, not divs named header.
Why semantics matter (11.1.1)
Compare <div class="nav"> with <nav>. They can look identical, but only nav tells software what the content is:
- Screen readers announce landmarks ('navigation', 'main', 'banner') and let users jump straight to them, and announce headings, lists and emphasis.
- Browsers can offer reader views and built-in behaviour (for example keyboard access for button).
- Search engines understand which part is the main content and which is navigation or adverts.
- Developers find the code easier to read and maintain.
Elements that define content (11.1.2)
<body>
<header>
<img src="images/logo.png" alt="Riverside Sports Centre">
<nav>
<a href="index.html">Home</a>
<a href="classes.html">Classes</a>
</nav>
</header>
<main>
<section>
<h2>This week's news</h2>
<article>
<h3>New pool opens</h3>
<p>Our 25 metre pool opens on Monday.</p>
</article>
</section>
<aside>
<h2>Opening times</h2>
<p>Every day from 7am.</p>
</aside>
</main>
<footer>
<p>Contact: info@example.com</p>
</footer>
</body>| Element | Meaning |
|---|---|
| header | Introductory content for the page or a section: logo, title, often navigation |
| nav | A block of major navigation links |
| main | The main content of the page, unique to it; only one visible main per page |
| section | A thematic group of content, normally with a heading |
| article | Self-contained content that makes sense on its own and could be shared: a news story, blog post, product card, comment |
| aside | Content related to, but separate from, the main content: a sidebar, related links, a fact box |
| footer | Footer for the page or a section: copyright, contact details, related links |
Grouping without a semantic element (11.1.3)
When no element has the right meaning, use the generic containers:
<div>: a block-level container with no meaning, used to group elements for styling or scripting (for example a row in a layout grid).<span>: an inline container with no meaning, used to style part of a line of text.
<div class="row">
<p>Price: <span class="price">4.50</span></p>
</div>Use a semantic element first; use div and span only when nothing fits.
Worked example
A page's code is `<div id="top">` containing the logo and links, `<div id="content">` for the story and `<div id="bottom">` for the copyright. Rewrite it semantically.
- The logo and links at the top are introductory: header, with the links inside nav.
- The story is the main content: main, and as a self-contained story, an article inside it.
- The copyright is footer content: footer.
Answer: header (with nav), main (with article) and footer replace the three divs.
Check yourself
- Which element should contain a self-contained blog post that would make sense on its own?
- `<aside>`
- `<article>`
- `<nav>`
- `<span>`
Show answer
`<article>`. article is for self-contained, independently distributable content.
- Which element suits a sidebar of related links beside the main story?
- `<main>`
- `<header>`
- `<section>`
- `<aside>`
Show answer
`<aside>`. aside is related but separate content.
- Explain how semantic elements such as nav and main help a screen reader user.
Show answer
The screen reader recognises them as landmarks, so the user can jump straight to the navigation or the main content instead of listening to the whole page.. Semantic elements become landmarks that assistive technology announces and lets users jump between.
- When should a div be used?
- Always, instead of header and footer
- Only inside a p element
- When content needs grouping for styling or layout and no semantic element fits
- For the main navigation links
Show answer
When content needs grouping for styling or layout and no semantic element fits. div has no meaning; use it only when nothing semantic fits.
- Which element marks the main content of a page, of which there should be only one visible per page? Type the element name.
Show answer
main. main contains the content unique to that page.
- A word inside a paragraph must be coloured red with no change of meaning. Which element should wrap it?
- `<div>`
- `<section>`
- `<span>`
- `<strong>`
Show answer
`<span>`. span is the generic inline container. strong would add the meaning 'important'.
- In a responsive page question, a candidate used `<div id="footer">` instead of a footer element. What did Pearson's examiners note about this?
- It does not meet a requirement to use HTML5 semantic elements
- It is preferred because ids are more specific
- It is invalid HTML
- It stops the CSS working
Show answer
It does not meet a requirement to use HTML5 semantic elements. The 2023 report noted candidates using divs named footer instead of HTML5 semantic elements.
Sources
- Pearson Edexcel International Advanced Subsidiary/Advanced Level in Information Technology specification (first teaching 2018), Unit 2 Topics 7 to 11
- Pearson qualifications: Edexcel International Advanced Level Information Technology (2018)
- Pearson WIT12/01 examiner report, June 2023 series
- Pearson WIT12/01 examiner report, June 2025 series
Last updated 8 November 2026. Spotted a mistake? Tell us.