learn-html-with-phoebe / Session 2 of 6
Learn HTML with Phoebe · Session 2 of 6

Words that link: text, lists, and the web's superpower

Session 1 gave your page a skeleton. Today it learns to speak: emphasis that means something, lists that organize, quotes and code marked honestly - and then the one feature that makes the web the web. By the end, your page links out to real places and jumps to its own sections.

🟢 Easy Total beginners welcome Data & AI folks too 45 min live + self-study depth
0-3 · Recap 3-23 · Concepts (live cards) 23-40 · Three demos 40-45 · Q&A
Part 0

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.

Live - presented in session Self-study - read after class ★ Try it now Every example on this page is editable - type and watch
★ What you walk out with today The meaning-first text toolkit (strong, em, lists, dl, blockquote, code), the full anatomy of a link including relative paths you can actually read, anchor navigation inside your own page, and a head with a real title, description, and favicon. Your project page ends the session with a working nav and five real links out into the world.
Part 1 · covers MDN "Emphasis and importance" + "Lists" + "Advanced text features"

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.

Same <em>, different word - the meaning moves with it <p>I <em>said</em> the model was ready.</p> → I said the model was ready. stress: it happened <p>I said the model was <em>ready</em>.</p> → I said the model was ready. stress: the state now Same tag, different word - the emphasis moves the meaning, not just the style.
🔍 Click to zoom - the tag never moves, the meaning moves with whatever word it wraps
<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>
Real world

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.

Nest a <ul> inside an <li> - the render nests too THE MARKUP THE RENDERED LIST <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> 1. Collect the data 2. Clean it - drop duplicates - fill missing values 3. Train, evaluate, repeat To nest, put the whole inner <ul> inside the <li> - a list item can hold its own sub-list.
🔍 Click to zoom - the sub-list lives inside the li, so numbering never breaks
<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; its cite attribute 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.
The quote habit, extended Quoting someone? blockquote + a visible credit line. Naming a book or paper? cite element. Pasting terminal output or a config snippet into a doc page? pre + code. Meaning first, styling in Session 5.
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.
Part 3 · finishes MDN "What's in the head"

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 lang attribute 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.
Demo 1 of 3 · the project grows

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.

Emphasis budget If everything is strong, nothing is. A good page uses strong a handful of times, em even less. When tempted to bold a whole paragraph, the fix is better writing, not more tags.
Demo 2 of 3

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.

Demo 3 of 3

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.

Homework

Try it yourself - this week ◐ 30-45 min total

Source material

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.

✓MDN: Emphasis and importancePart 1 - strong/em vs b/i, meaning first
✓MDN: ListsPart 1 - ul, ol, li, nesting
✓MDN: Advanced text featuresPart 1 - dl, blockquote, cite, code, pre, small-print squad
✓MDN: Creating linksPart 2 - href anatomy, relative paths, anchors, link text
✓MDN: What's in the headPart 3 - description, favicon, stylesheet link; started in Session 1
✓web.dev: Links + Lists + Navigation + Text basicsshared core taught once across Parts 1-2
◐web.dev: Metadata (social/OG images)description today; social cards deep dive in 6.3
Check yourself

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.

Session 2 cheat sheet · pin this

Emphasis with meaningem = spoken stress, strong = real importance. b and i look the same and mean nothing - machines only hear the first two.
Listsul unordered, ol ordered, li items only. Nest by putting the inner list INSIDE an li. Navs are lists of links.
Paired contentdl wraps, dt = term, dd = description. Glossaries, FAQs, metadata panels.
Quotes and codeblockquote (+ cite attribute for the URL), cite element for work titles, q inline, code for literals, pre keeps whitespace.
Link anatomya href="..." + link text that says where it goes. "Click here" is a crime against skimmers and screen readers.
Relative pathsSame folder: name. Subfolder: folder/name. Up one: ../name. Always measured from the file the link lives in.
Anchorsid="section" on the target, href="#section" on the link. Both halves, exact spelling, or nothing happens.
The finished headtitle as "Name - what you do", meta description ~150 chars, link rel="icon" favicon, link rel="stylesheet" waiting for Session 5.