Sub topic 8
Marking Up a Newsroom Page with Semantic HTML
Assume you know basic HTML, understand what a press release is, and can work with URLs and hosted files. This chapter focuses on the HTML structure of a newsroom page. Metadata such as Open Graph tags and JSON-LD builds on this structure.
Semantic HTML uses elements that describe the meaning of content. A main element identifies the page's primary content. A section groups related content. An article represents a self-contained item, such as one press release. These meanings help screen readers, search engines, and developers understand the page.
Choose elements by meaning
Use headings to create a clear outline. Start with one h1 for the page title. Use h2 for major sections and h3 for items inside those sections. Do not choose a heading because its default text size looks right. Use CSS to control appearance.
| Element | Use in a newsroom |
|---|---|
| `main` | Contains the primary newsroom content |
| `section` | Groups releases, contacts, or media resources |
| `article` | Contains one complete release or news post |
| `time` | Gives a publication date in a machine-readable form |
| `address` | Identifies contact information for the page or organization |
A newsroom can also use header for introductory content and nav for links to major areas. Use footer for supporting information. These elements create landmarks that assistive technology can expose in a navigation menu.
Build a clear page structure
The following page gives each section a heading and connects the section to that heading with aria-labelledby. The aria-labelledby attribute is an accessibility attribute. It tells assistive technology which visible text names an element.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Acme Newsroom</title>
</head>
<body>
<header>
<p><a href="/">Acme</a></p>
<nav aria-label="Primary navigation">
<a href="/newsroom">Newsroom</a>
<a href="/about">About</a>
</nav>
</header>
<main id="newsroom">
<h1>Acme Newsroom</h1>
<p>News, announcements, and resources for journalists.</p>
<section aria-labelledby="releases-heading">
<h2 id="releases-heading">Press releases</h2>
<article>
<h3>
<a href="/newsroom/acme-launches-widget-2">
Acme launches Widget 2
</a>
</h3>
<p>
<time datetime="2026-03-12">March 12, 2026</time>
</p>
<p>Widget 2 cuts setup time for small teams.</p>
</article>
</section>
<section aria-labelledby="contact-heading">
<h2 id="contact-heading">Media contact</h2>
<address>
Jordan Lee<br>
<a href="mailto:[email protected]">[email protected]</a>
</address>
</section>
</main>
<footer>
<p>© 2026 Acme</p>
</footer>
</body>
</html>The datetime value uses the ISO 8601 date format, YYYY-MM-DD. Visitors see a friendly date, while software receives an unambiguous value. The release title is a link to a stable URL, so journalists can bookmark it and reference it directly.
Check the structure
A useful mental model is to check the page from broad landmarks to individual content.
Use a validator and a keyboard to check the result. Confirm that headings follow a logical order, links describe their destinations, and every landmark has a useful purpose. Avoid adding ARIA roles when a native HTML element already expresses the meaning. Native elements usually provide better keyboard and assistive-technology behavior with less code.
Exercise
Which element should contain one complete press release, and which element should identify its publication date?
Show answer
Use an article for the complete press release and a time element with a datetime attribute for its publication date.