Why this session exists
A page of headings and paragraphs is a document. A page that links is part of the web - that is the entire difference between a file and a site. Today your index.html outline from Session 1 becomes a real, connected page: meaningful text inside, honest links outward, and a finished head on top.
Meaningful text - say what you mean 8 min live
HTML's text elements are a vocabulary of meaning, not a styling menu. Pick the element that says what the text IS, and every machine that reads your page - browser, screen reader, search engine, AI assistant - understands you.
Livestrong and em - meaning, not looks3 min▶
<em> marks stress emphasis - the word you would lean on out loud, which can flip a sentence's meaning. <strong> marks strong importance - warnings, the part that must not be missed. Yes, <b> and <i> exist and look the same, but they carry no meaning: bold and italic with nothing to say. Machines hear strong and em; they shrug at b and i.
<p>I <em>said</em> the model was ready.</p> <p>I said the model was <em>ready</em>.</p> <p><strong>Warning:</strong> retraining overwrites the old weights.</p>
Screen readers can change intonation on em and announce importance on strong - your emphasis survives for people who never see the italics. In a data team's runbook, <strong>do not rerun this backfill twice</strong> is a machine-readable warning, not just bold decoration.
LiveLists - ul, ol, and lists inside lists3 min▶
Two list flavors, one rule. <ul> when order doesn't matter (groceries, skills, links you love), <ol> when it does (steps, rankings). Both hold only <li> children. To nest, put the whole inner list INSIDE an <li> - a list item can contain its own sub-list.
<h3>Training a model, honestly</h3>
<ol>
<li>Collect the data</li>
<li>Clean it
<ul>
<li>drop duplicates</li>
<li>fill missing values</li>
</ul>
</li>
<li>Train, evaluate, repeat</li>
</ol>
One habit worth building now: navigation menus are lists of links. Session demos below use exactly that pattern, and Session 3 wraps it in a <nav>.
Livedl - when your content comes in pairs2 min▶
Term and definition, name and value, question and answer - paired content gets the description list: <dl> wraps the whole thing, <dt> holds each term, <dd> holds its description. Glossaries, FAQ pages, and metadata panels are all dl territory.
<dl> <dt>Model</dt> <dd>A program that learned patterns from data.</dd> <dt>Training</dt> <dd>Showing it examples until the patterns stick.</dd> <dt>Overfitting</dt> <dd>Memorizing the examples instead of the pattern.</dd> </dl>
LiveQuotes and code - blockquote, cite, code, pre2 min▶
Borrowed words and computer words both get marked honestly:
<blockquote>wraps a quoted block; itsciteattribute holds the source URL (invisible, but machines can read it). The<cite>element, separately, marks the title of a work in your visible text.<q>is the inline version - the browser adds the quote marks for you.<code>marks inline computer text:index.html,href, a function name. Readers instantly see "this is literal, type it exactly".<pre>preserves whitespace - the one place Session 1's collapsing rule is switched off. Wrap<pre><code>together for multi-line code blocks, exactly like the orange panels on this page.
Self-studyThe small-print squad - small, sub, sup, time, address2 min read▶
Five specialists you'll reach for occasionally, worth recognizing on sight:
<small>- side comments and fine print: copyright lines, disclaimers.<sub>and<sup>- subscript and superscript: H<sub>2</sub>O, x<sup>2</sup>, footnote markers.<time>- a date or time with a machine-readable twin:<time datetime="2026-07-13">this Monday</time>. Humans read the words, calendars and search engines read the attribute.<address>- contact information for the page or article author. It lands in your project footer in Session 3.
Links - the superpower 8 min live
The a element is why it's called a web. One element, one attribute that matters most - href - and two ways to write an address: the full URL, or a path measured from the file the link lives in.
LiveAnatomy of a link - absolute vs relative3 min▶
An absolute URL is the full postal address - protocol, site, path - and works from anywhere: https://developer.mozilla.org. A relative URL is directions from where you're standing: about.html, images/cat.jpg, ../index.html. Use relative links between your own files (they keep working when the whole folder moves, including to GitHub Pages in Session 6) and absolute links for everyone else's sites.
<p>Absolute - the full address:</p> <p><a href="https://developer.mozilla.org">MDN Web Docs</a></p> <p>Relative - measured from this file:</p> <ul> <li><a href="about.html">About me</a> (same folder)</li> <li><a href="images/cat.jpg">My cat</a> (subfolder)</li> <li><a href="../index.html">Home</a> (up one level)</li> </ul>
LiveLink text - say where it goes2 min▶
Screen-reader users routinely pull up a list of every link on the page, out of context. A list that reads "click here, click here, here, this link" is useless; a list that reads "MDN's link guide, my projects, email Phoebe" is a table of contents. The link text itself must say where the link goes.
Search engines weigh link text when deciding what the destination page is about - every "click here" on the web is a wasted vote. Good link text is free SEO, free accessibility, and better writing, all in one habit.
LiveAnchors - links that jump within the page2 min▶
Give any element an id, and href="#that-id" jumps straight to it - same page, no reload. This is how tables of contents, "back to top" links, and your project page's nav all work. Two halves, one contract: the id on the target, the # in the link.
<p> <a href="#about">About</a> · <a href="#projects">Projects</a> · <a href="#contact">Contact</a> </p> <h2 id="about">About</h2> <p>A paragraph tall enough to scroll past.</p> <p>And another, for honest scrolling room.</p> <h2 id="projects">Projects</h2> <p>Things I have shipped.</p> <p>More filler so the jump is visible.</p> <h2 id="contact">Contact</h2> <p>Say hi. <a href="#about">Back to top-ish</a></p>
Self-studymailto, download, and new tabs done honestly3 min read▶
- Email links:
href="mailto:you@example.com"opens the visitor's mail app with the address filled in. Fair warning: any address published this way is harvestable by spam bots - many people prefer a spelled-out "phoebe at example dot com" or a contact form (Session 4). - The download attribute:
<a href="report.pdf" download>asks the browser to save the file instead of opening it. It only works for files on your own site. - New tabs:
target="_blank"opens the link in a new tab. Pair it withrel="noopener", which stops the new page from reaching back and controlling yours (modern browsers now do this by default, but writing it keeps you explicit and covers older ones). Honesty rule: users can open a new tab themselves whenever they want - force it only when losing the current page would hurt, like mid-form.
Finishing the head 4 min live
Session 1 put a charset and a title in your head. Three more lines make it professional: a description search engines can quote, a favicon for the browser tab, and the stylesheet link that Session 5 will bring to life.
LiveTitle, description, favicon, and a CSS teaser4 min▶
- title, revisited: it's also the bookmark name and the headline search results show. "Phoebe Fu - data and AI" beats "index".
- meta description: the grey sentence under your headline in search results. One honest sentence, roughly 150 characters - if you don't write it, the search engine improvises from your page.
- Favicon:
<link rel="icon" href="favicon.ico">points at a small icon file next to your page. No icon file yet? The emoji trick below inlines one as an SVG data URL - zero files, instant personality. - The Session 5 teaser:
<link rel="stylesheet" href="css/site.css">is how a page puts on clothes. We add the line now; the wardrobe arrives in Session 5.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Phoebe Fu - data and AI</title>
<meta name="description"
content="Phoebe's corner of the internet: projects, notes, and experiments in data and AI.">
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🌸</text></svg>">
<link rel="stylesheet" href="css/site.css">
</head>
<body>
<h1>Everything above renders nothing</h1>
<p>Yet tabs, bookmarks, and search snippets all read it.</p>
</body>
</html>
Self-studyHead hygiene - lang, author, and what stays out2 min read▶
- lang on elements: the
langattribute from your html tag also works on any element. Quoting a French sentence on an English page?<q lang="fr">tells screen readers to switch pronunciation mid-page. - meta author:
<meta name="author" content="Phoebe Fu">- a polite credit some tools read. Harmless, occasionally useful. - What does NOT belong in the head: anything visible. Headings, paragraphs, images placed in the head get silently relocated into the body by the browser - your structure rewritten without a warning. And no secrets anywhere in the file: the head is the first thing "View Source" shows.
From outline to real page ★ 8 min · follow along
Your Session 1 outline becomes a navigable page: a nav list at the top that jumps to each section, and honest text inside them.
Open your index.html. Give each of your three <h2> elements an id: id="about", id="projects", id="contact". Lowercase, no spaces - ids are picky.
Right under your h1, add a <ul> of three links: <a href="#about">About</a> and friends. A list of links - the classic nav pattern, formalized in Session 3.
Save, reload, click all three. If one doesn't jump, the id and the href disagree - check spelling and case, they must match exactly.
Now the words: 2-3 real paragraphs per section, written like you talk. Add <strong> only where something genuinely matters and <em> only where you'd stress the word aloud - honest emphasis, sparingly.
Under Projects, turn your two h3 entries into an honest description: one paragraph each, with <code> around any tool or file names.
Links I love ★ 5 min · build your own
Your page joins the web: a small, honest blogroll of places you actually recommend, plus a way to reach you.
In your About or Contact section, add an <h3>Links I love</h3> and a <ul> of five real external links - sites, newsletters, docs, tools you genuinely rate.
Write the link text as a recommendation: "MDN's HTML reference", not "click here for HTML stuff". Each link should make sense read alone.
Make one of the five a mailto: link to an address you're comfortable publishing (or a spelled-out address if you're not - see the self-study card).
Click all five. A link you haven't clicked is a link you haven't tested - habit for life.
Head upgrade ★ 4 min · build your own
Three lines in the head and your page looks professional in the tab, the bookmark bar, and (one day) the search results.
Rewrite your <title> as "Your Name - what you do". Check the browser tab after reload.
Add <meta name="description" content="..."> with one honest sentence about the page. Aim near 150 characters - write it for a human skimming search results.
Add the emoji favicon from the Part 3 playground (copy the whole <link rel="icon" ...> line, swap the emoji). Reload and enjoy your tab. Prefer a real file later? Drop a favicon.ico next to index.html and point the link at it.
Add the Session 5 teaser line: <link rel="stylesheet" href="css/site.css">. It quietly does nothing until the file exists - a reserved parking spot for your future styles.
Try it yourself - this week ◐ 30-45 min total
- Grow "Links I love" to ten, grouped with nested lists (a "Reading" sub-list, a "Tools" sub-list). Every link text a real recommendation.
- Add one
<dl>to your page: 4-5 terms from your world (data, cooking, climbing - your call), each with a one-line plain-English dd. - Add one honest
<blockquote>- a line that stuck with you, with a visible credit and the source URL in the cite attribute. - Link-text audit: open any news site, list its first ten links out of context, and count how many still make sense. Feel the difference discipline makes.
- Bring to Session 3: one photo of yourself (or anything you'd put on your page) - images land next week and yours goes live.
Official sources covered
This session teaches the working content of these lessons from MDN's Structuring content with HTML and web.dev Learn HTML. Their interactive challenges stay with the originals - our exercises are equivalents, not copies.
Three questions before you go 🎯 ◐ 90 seconds
1 · You're marking a genuine warning in a runbook: "never rerun the backfill twice". Which element?
strong carries importance for every reader, including screen readers and search engines. b looks identical but says nothing; em is spoken stress, not a warning.
2 · Your link lives in my-site/index.html. The photo is at my-site/images/me.jpg. Which href?
Paths are measured from the file the link lives in: index.html sits next to the images folder, so it steps into it directly. ../ would climb out of my-site first - one level too far.
3 · You have <h2 id="projects"> on the page. Which link jumps to it?
The # prefix means "an id on this page". A goes looking for a separate file; B is a made-up syntax the browser treats as a (broken) relative path.