Lab 14: Modern HTML Semantics
Overview
Step 1: HTML5 Semantic Elements
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Article Page</title>
</head>
<body>
<!-- <header>: introductory content, navigation -->
<header>
<nav aria-label="Main navigation">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/about">About</a></li>
</ul>
</nav>
</header>
<!-- <main>: primary content (one per page) -->
<main id="main-content">
<!-- <article>: self-contained, redistributable content -->
<article>
<header>
<h1>Article Title</h1>
<p>By <address><a href="/author">Jane Doe</a></address></p>
<!-- <time>: machine-readable datetime -->
<time datetime="2024-03-15T14:30:00Z">March 15, 2024</time>
</header>
<!-- <section>: thematic grouping with heading -->
<section aria-labelledby="intro-heading">
<h2 id="intro-heading">Introduction</h2>
<p>Content with <mark>highlighted term</mark> for context.</p>
</section>
<section>
<h2>Details</h2>
<!-- <details>/<summary>: disclosure widget -->
<details>
<summary>Show technical details</summary>
<p>Hidden content revealed on click.</p>
</details>
<!-- <figure>/<figcaption> -->
<figure>
<img src="diagram.png" alt="System architecture diagram">
<figcaption>Figure 1: System architecture overview</figcaption>
</figure>
</section>
<!-- <aside>: tangential content -->
<aside aria-label="Related links">
<h3>See Also</h3>
<ul>
<li><a href="/related">Related Article</a></li>
</ul>
</aside>
</article>
</main>
<!-- <footer>: authorship, copyright, links -->
<footer>
<p><small>© 2024 My Site. All rights reserved.</small></p>
</footer>
</body>
</html>Step 2: Semantic Interactive Elements
Step 3: Semantic Text Elements
Step 4: Microdata
Step 5: JSON-LD Structured Data
Step 6: Open Graph & Twitter Cards
Step 7: Additional Head Meta
Step 8: Capstone — JSON-LD Schema Validator
Summary
Element
Purpose
SEO/A11y Impact
Last updated
