Unit 1 home
FSWD · MERN CLASS 3 / 48 60-MIN SESSION
CLASS 3 · P 1/13PGDN NEXT · PGUP BACK
UNIT 1 · CLASS 3 OF 12 UI23PC510CS · THEORY REAL TAGS TODAY

Class 3 · 60 minutes

Core HTML tags: structure, text, and the skeleton every page wears.

Last class you wrote six lines and the browser obeyed. Today you learn what those six lines actually were — and then you go far past them: headings, paragraphs, emphasis, comments, lists, images. By the end of this hour the page on your screen stops being "the hello file" and starts being a real menu for a real project.

THE PROMISE OF THIS HOUR

Every tag you meet today you will meet twice: once as code on the left, once as what the browser renders on the right. Nothing stays abstract. And one of today's pages belongs to a project you'll be building for the rest of this course — its first appearance is a humble list, and that's exactly how real products start.

Explain every line of the HTML skeleton
Use h1–h6 as hierarchy, not as font sizes
Build ordered & unordered lists
Spot a broken tag from the render alone
TODAY, IN ORDER
01The skeleton, line by line — and a promise about every example from now onIDEA
02Headings h1–h6 — a chain of command, not a font menuIDEA
03Paragraphs, bold-with-meaning, italics-with-meaning, line breaksIDEA
04Comments — notes the browser never showsIDEA
05Lists — and the first real page of our course projectCODE
06Call the render — predict before you peekTRY IT
07Images — and the attribute that speaks when pictures can'tIDEA
08The case of the swallowed menu — fix a page from its render aloneTRY IT
09Indentation — the house style we keep from here forwardIDEA

Idea one

The skeleton: six lines every page you'll ever write begins with.

Last class you typed hello.html and it worked. But four of its lines you typed on faith. Today the faith ends — here is the whole skeleton, and what each line is actually doing for you.

MINI PROBLEM · SKELETON.HTML
PROBLEM
Build the smallest complete page there is — nothing but the six-line skeleton plus one visible sentence — and watch where each part actually lands: which line reaches the tab, and which reaches the window.
REQUIRE­MENTS
  • Save as skeleton.html inside class-03 in your fswd-practice folder
  • Full skeleton: doctype, <html lang="en">, head with <meta charset="UTF-8"> and a title, then the body
  • Title text: My Page · body text: one sentence of your choice
EXPECTED OUTPUT
The browser tab reads My Page; the window shows exactly one line of text — nothing from the head appears in the window.
skeleton.html
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>My Page</title>
6 </head>
7 <body>
8 Everything you SEE goes here.
9 </body>
10</html>
file:///C:/Users/student/Desktop/fswd-practice/class-03/skeleton.html

Everything you SEE goes here.

The tab above reads "My Page" — that's line 5 at work. Only line 8's text lands in the window itself.
SAVE THIS AS — TYPE IT EXACTLY
FOLDERC:\Users\student\Desktop\fswd-practice\class-03\
FILENAMEskeleton.html — the first file of your sandbox; every later file today starts from this skeleton
EDITORVS Code — Ctrl+S to save
VIEW ITRight-click the file in VS Code's explorer, then Open with Live Server — one sentence in the window, "My Page" on the tab
EVERY LINE, HONESTLY EXPLAINED
<!DOCTYPE html>
The very first line, always. It tells the browser "read this file by the modern HTML rules." Skip it and the browser falls back into an ancient compatibility mode with decades-old quirks. It's a declaration, not a tag — so it has no closing partner.
<html lang="en">
The root — every other tag lives inside it. lang="en" declares the page's language, which screen readers use to pick the right pronunciation and search engines use to classify the page. It closes on the very last line as </html>.
<head> … </head>
Information about the page — nothing in here appears in the window. Think of it as the label on a tiffin box: the label tells you what's inside, but the label isn't food.
<meta charset="UTF-8">
Tells the browser which character encoding your text uses. UTF-8 covers effectively every script on Earth — English, Telugu, Hindi, emoji, all of it. Leave this out and non-English characters can render as garbage like ः.
<title> … </title>
The text on the browser tab, the name a bookmark saves, and the headline a search result shows. It renders in the tab bar — never inside the page window.
<body> … </body>
Everything the visitor actually sees. Every heading, paragraph, list, and image you write today goes between these two tags — nowhere else.
A PROMISE, STARTING NOW

From this page until the last page of this course, every HTML example ships the whole skeleton. Never a floating <h1> with no home, never a snippet you can't actually save and open. What you see in a code panel is always a complete, valid file — copy it, save it, double-click it, and it works.

The only exceptions: a tag named mid-sentence in prose (like this <p> just now), and short reference-table rows. Anything presented as runnable is complete — that's the deal.

EXTRA DEPTH · WHY THE BROWSER FORGIVES, AND WHY YOU SHOULDN'T

Here's a strange fact: if you delete the doctype, the head, even the <html> tag itself — most pages still sort of render. Browsers are heroically forgiving, because the web is full of broken pages and browsers compete on never showing a blank screen. So why bother with the skeleton at all?

Because "sort of renders" is where bugs breed. Without <meta charset="UTF-8"> your page works until the first non-English character. Without lang a screen reader mispronounces everything. Without the doctype, CSS measurements behave differently in ways that will cost you an afternoon in Unit 1's CSS classes. Professionals ship the full skeleton not because pages die without it — but because pages misbehave subtly without it, and subtle is expensive.

Idea two

Headings: a chain of command, not a font menu.

HTML gives you six heading tags, <h1> down to <h6>. Yes, they get smaller as the number grows — but size is the least important thing about them. They declare rank: the page's one main title, its sections, its sub-sections.

MINI PROBLEM · HEADINGS.HTML
PROBLEM
Put all six heading ranks on one page so you can see with your own eyes that headings are a chain of command — one page title, then sections, then sub-sections — not a font-size menu.
REQUIRE­MENTS
  • Save as headings.html inside class-03
  • Full skeleton · title text: Heading Ranks
  • One of each: <h1> through <h6>, each with text describing its own rank
EXPECTED OUTPUT
Six lines of text stepping down in size from <h1> to <h6>; the tab reads Heading Ranks.
headings.html
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>Heading Ranks</title>
6 </head>
7 <body>
8 <h1>Page title — one per page</h1>
9 <h2>A major section</h2>
10 <h3>A sub-section of that</h3>
11 <h4>Rarely needed</h4>
12 <h5>Almost never</h5>
13 <h6>You may retire without using this</h6>
14 </body>
15</html>
file:///C:/Users/student/Desktop/fswd-practice/class-03/headings.html
Page title — one per page
A major section
A sub-section of that
Rarely needed
Almost never
You may retire without using this
Six ranks, six sizes — but read them as an org chart, not a size chart.
SAVE THIS AS — TYPE IT EXACTLY
FOLDERC:\Users\student\Desktop\fswd-practice\class-03\
FILENAMEheadings.html
EDITORVS Code — Ctrl+S to save
VIEW ITRight-click the file in VS Code's explorer, then Open with Live Server — six lines stepping down in size
The beginner trap: picking a heading for its size.

"I want smaller text, so I'll use <h4>" — that's the wrong instinct, and Unit 1's CSS classes will show you the right one (any tag can be any size once CSS arrives). Choose the heading number by asking one question only: what rank does this title hold on this page? One <h1> per page, <h2> for its major sections, <h3> inside those. Screen readers let users jump heading-to-heading like a table of contents — a page with honest ranks is navigable; a page that picked tags for their looks is a maze.

EXTRA DEPTH · TRY BREAKING THE LADDER

Save headings.html, then deliberately mix it up: swap the <h1> and the <h5>. The page still renders — no error, no warning. That silence is the lesson: HTML never complains about bad structure, it just quietly becomes worse HTML. The browser doesn't care. Screen-reader users, search engines, and the teammate who inherits your code care enormously.

While you're in there: put your own name in the <h1> and your branch and section in an <h2>. Every file you personalise is one you'll remember.

Idea three

Paragraphs, emphasis, and the line-break question.

Headings are the signposts; paragraphs are the road. Three small tags handle almost all running text — and two of them carry meaning, not just styling.

MINI PROBLEM · TEXT-TAGS.HTML
PROBLEM
Write three short paragraphs that prove two things at once: <strong> and <em> add meaning (not just looks), and only <p> and <br> control line breaks — your Enter key controls nothing.
REQUIRE­MENTS
  • Save as text-tags.html inside class-03 · title text: Text Tags
  • Paragraph 1: contains a <strong> phrase, and is deliberately typed across several source lines
  • Paragraph 2: stresses one word with <em>
  • Paragraph 3: a two-line address using a single <br>
EXPECTED OUTPUT
Three paragraphs. Paragraph 1 flows as one line despite the Enter keys in the source, with its <strong> phrase bold; paragraph 2 shows one italic word; the address breaks exactly once — at the <br>.
text-tags.html
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>Text Tags</title>
6 </head>
7 <body>
8 <p>Order in a lecture break and your food
9 reaches your hostel block <strong>before the
10 break ends</strong>.</p>
11 <p>Eating well should be the <em>fast</em>
12 option, not the slow one.</p>
13 <p>Hostel Block C<br>Room 214</p>
14 </body>
15</html>
file:///C:/Users/student/Desktop/fswd-practice/class-03/text-tags.html

Order in a lecture break and your food reaches your hostel block before the break ends.

Eating well should be the fast option, not the slow one.

Hostel Block C
Room 214

Notice: the line breaks you typed inside paragraph one vanished. Only <p> and <br> control breaks — never your Enter key.
SAVE THIS AS — TYPE IT EXACTLY
FOLDERC:\Users\student\Desktop\fswd-practice\class-03\
FILENAMEtext-tags.html — type paragraph one across several source lines on purpose; watching those Enter keys vanish is the lesson
EDITORVS Code — Ctrl+S to save
VIEW ITRight-click the file in VS Code's explorer, then Open with Live Server — paragraph one flows as ONE line; the address breaks exactly once
<strong> and <em> carry meaning

<strong> says "this matters — don't miss it." <em> says "stress this word when reading aloud." A screen reader genuinely changes its voice for them. They happen to render bold and italic — but you're marking importance, not decorating. When you only want the look with no meaning, CSS will give you that properly in a few classes.

<br> or a new <p>?

Ask: is this a new thought or the same thought continuing on a new line? A new thought earns a new <p>. The same thought with a forced break — an address, lines of a poem — takes <br>. If you find yourself typing <br><br> to fake paragraph spacing, stop: that's a paragraph asking to exist.

EXTRA DEPTH · WHY YOUR ENTER KEY DOESN'T WORK

HTML treats any run of spaces, tabs, and newlines as one single space — the rule is called whitespace collapsing. It's why you can format your code beautifully across many lines and the paragraph still renders as one flowing sentence. Your Enter key formats the code; <p> and <br> format the page. Two different worlds, and today you learned which key belongs to which.

Also worth noticing: <br> has no closing tag — like <meta>, it's a void tag: it doesn't wrap content, it just is. You'll meet one more void tag today: <img>.

Idea four

Comments: notes the browser never shows.

Anything between <!-- and --> is invisible on the page. It exists only in the code — a note from you, to future-you, or to a teammate. It looks like a small feature. It's actually a debugging superpower.

MINI PROBLEM · COMMENTS.HTML
PROBLEM
Switch a whole paragraph OFF without deleting it — and sign your file — using comments the browser will never show.
REQUIRE­MENTS
  • Save as comments.html inside class-03 · title text: Comments
  • An author-note comment with your name and roll number at the top of the body
  • An <h1>, then a whole <p> wrapped inside <!-- -->, then one normal visible <p>
EXPECTED OUTPUT
Only the heading and the visible paragraph render. Both comments — the author note AND the switched-off paragraph — leave no trace in the window.
comments.html
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>Comments</title>
6 </head>
7 <body>
8 <!-- Written by K Student, Roll 733001 -->
9 <h1>Today's Specials</h1>
10 <!-- <p>Out of stock till Monday.</p> -->
11 <p>Fresh millet bowls at the counter.</p>
12 </body>
13</html>
file:///C:/Users/student/Desktop/fswd-practice/class-03/comments.html
Today's Specials

Fresh millet bowls at the counter.

Lines 8 and 10 exist in the file — and leave no trace here. Line 10 is a whole paragraph, switched off without being deleted.
SAVE THIS AS — TYPE IT EXACTLY
FOLDERC:\Users\student\Desktop\fswd-practice\class-03\
FILENAMEcomments.html — put YOUR name and roll number in line 8's author note
EDITORVS Code — Ctrl+S to save
VIEW ITRight-click the file in VS Code's explorer, then Open with Live Server — the heading and ONE paragraph render; both comments leave no trace
Comments as notes

Label who wrote a file, mark where a section starts, leave a warning for the next reader. Code is read far more often than it's written — a one-line note today saves a teammate (or October-you) twenty minutes of head-scratching.

Comments as a debugging habit

Here's the habit worth building from today: when a page misbehaves, don't delete suspect lines — comment them out. Wrap the suspect in <!-- -->, reload, observe. Problem gone? You found your culprit — and the code is still right there to fix rather than retype. It's an undo button you control.

EXTRA DEPTH · ONE RULE AND ONE WARNING

The rule: comments don't nest. The first --> the browser meets ends the comment, so you can't wrap a comment inside another comment.

The warning: comments are invisible on the page, not in the file. Anyone can press Ctrl+U in Chrome and read your page's full source, comments included. Never leave passwords, keys, or anything private in a comment — later in this course you'll learn where secrets actually belong, and it is never in HTML.

Idea five · a project begins

Lists — and the first real page of something bigger.

Quietly, this course has a destination. Over the coming Labs you'll build a real food-ordering site for a campus problem you know personally: by the time you reach the mess counter, the healthy options are gone. The project is called Poshtik Campus — and every product like it begins exactly the way yours does today: with a menu, typed as a list.

MINI PROBLEM · MENU.HTML
PROBLEM
Type the very first page of Poshtik Campus: today's ten healthy dishes (order doesn't matter) and the three ordering steps (order absolutely matters) — choosing the right list type for each.
REQUIRE­MENTS
  • Save as menu.html inside class-03 · title text: Poshtik Campus Menu
  • <h1> page title, then <h2> Today's Healthy Ten followed by a <ul> of ten dishes
  • <h2> How Ordering Works followed by an <ol> of the three steps: browse, then order, then collect
  • Do NOT type any bullet symbols or numbers yourself
EXPECTED OUTPUT
Ten bulleted dishes under the first heading; the ordering steps numbered 1, 2, 3 under the second — with every bullet and number drawn by the browser, not typed by you.
menu.html
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>Poshtik Campus Menu</title>
6 </head>
7 <body>
8 <h1>Poshtik Campus Menu</h1>
9 <h2>Today's Healthy Ten</h2>
10 <ul>
11 <li>Jonna Rotte Wrap</li>
12 <li>Sajja Roti Wrap</li>
13 <li>Ragi Sangati Bowl</li>
14 <li>Ragi Idli Bowl</li>
15 <li>Pesarattu with Sprouts</li>
16 <li>Ulava Charu Protein Bowl</li>
17 <li>Gongura Sprouts Salad</li>
18 <li>Sprouts Moong Chilla</li>
19 <li>Paneer Protein Bowl</li>
20 <li>Millet Protein Shake</li>
21 </ul>
22 <h2>How Ordering Works</h2>
23 <ol>
24 <li>Browse the menu in your break</li>
25 <li>Place your order</li>
26 <li>Collect at your hostel block</li>
27 </ol>
28 </body>
29</html>
file:///C:/Users/student/Desktop/fswd-practice/class-03/menu.html
Poshtik Campus Menu
Today's Healthy Ten
  • Jonna Rotte Wrap
  • Sajja Roti Wrap
  • Ragi Sangati Bowl
  • Ragi Idli Bowl
  • Pesarattu with Sprouts
  • Ulava Charu Protein Bowl
  • Gongura Sprouts Salad
  • Sprouts Moong Chilla
  • Paneer Protein Bowl
  • Millet Protein Shake
How Ordering Works
  1. Browse the menu in your break
  2. Place your order
  3. Collect at your hostel block
One page, both list types: bullets where order doesn't matter, numbers where it does.
<ul> — unordered

Bullets. Use when the items are equals and sequence carries no meaning — a menu, ingredients, features. Reshuffle the dishes and the menu means exactly the same thing.

<ol> — ordered

Numbers, generated by the browser — you never type "1." yourself. Use when sequence is the meaning: steps, rankings, instructions. Add a step later and the browser renumbers everything for free.

The one rule of <li>

An <li> lives only as a direct child of a <ul> or an <ol> — never loose on its own. And notice the nesting shape in the code: open list, items inside, close list — everything opened gets closed, inside-out, like stacked tiffin boxes.

SAVE THIS AS — TYPE IT EXACTLY
FOLDERC:\Users\student\Desktop\fswd-practice\class-03\
FILENAMEmenu.html
EDITORVS Code — Ctrl+S to save
VIEW ITRight-click the file in VS Code's explorer, then Open with Live Server
New class, new subfolder — same sandbox.

Create class-03 inside your fswd-practice folder before saving — from now on, each class's files live in that class's own subfolder, so October-you can find anything in seconds. Missed last class and don't have fswd-practice yet? Make it on your Desktop first — five seconds — then carry on. And to be clear: this menu page is sandbox practice. The real Poshtik Campus site starts life in its own folder at Lab 1 — today you're rehearsing the moves.

EXTRA DEPTH · WHY THESE TEN DISHES

The menu isn't random. Jonna (sorghum), sajja (pearl millet), ragi, ulavalu (horse gram), pesarattu, gongura — that's genuine Telangana–Andhra home food, the kind the mess runs out of first. The chilla, paneer bowl, and protein shake round it out for everyone. These exact ten items will follow you through this whole course: they'll get prices in a table (Class 5), an order form (Classes 6–7), styling (Class 9), and eventually live in a real database (Unit 4). Learn the list once — it pays rent for five units.

Your turn · no peeking

Call the render.

READ THE CODE · PREDICT THE PAGE

Below is a complete file. Before anyone opens it in a browser, write down — on paper or in the box — exactly what the browser window will show, top to bottom. Not roughly: exactly. How many visible lines? Which are big, which are bulleted, which are numbered? Does anything in the file not appear at all?

predict.html
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>Snack Counter</title>
6 </head>
7 <body>
8 <h1>Evening Snacks</h1>
9 <!-- <h2>Fried Corner</h2> -->
10 <p>Only <strong>healthy</strong> options
11 after 4 pm.</p>
12 <ol>
13 <li>Sprouts Moong Chilla</li>
14 <li>Millet Protein Shake</li>
15 </ol>
16 </body>
17</html>
Four things to commit to before checking

1) What does the browser tab say? 2) How many elements render in the window? 3) Bullets or numbers — and why? 4) What happens to line 9 and to the words "Snack Counter"? Write your answers down — a prediction you didn't write down is a guess you can quietly revise after seeing the answer, and that teaches you nothing.

The reveal

What the browser actually shows.

Commit to your prediction first — then check.

predict.html
5 <title>Snack Counter</title>
8 <h1>Evening Snacks</h1>
9 <!-- <h2>Fried Corner</h2> -->
10 <p>Only <strong>healthy</strong> options…
12 <ol> …two items… </ol>
file:///C:/Users/student/Desktop/fswd-practice/class-03/predict.html
Evening Snacks

Only healthy options after 4 pm.

  1. Sprouts Moong Chilla
  2. Millet Protein Shake
Tab: "Snack Counter". Window: three rendered elements. "Fried Corner" — nowhere, and appropriately so.
SAVE THIS AS — ONLY AFTER YOUR PREDICTION IS WRITTEN
FOLDERC:\Users\student\Desktop\fswd-practice\class-03\
FILENAMEpredict.html — type the full 17-line file from the activity above, exactly as printed
EDITORVS Code — Ctrl+S to save
VIEW ITRight-click the file in VS Code's explorer, then Open with Live Server — score your prediction against the real render, checkpoint by checkpoint
Score your own prediction — the four checkpoints:
  1. The tab reads Snack Counter — the <title> renders in the tab bar, never in the window. If you predicted "Snack Counter" as a visible heading, that's the head/body boundary asking for one more look.
  2. Three elements render: one big heading, one paragraph with a single bold word, one list.
  3. Numbers, not bullets — line 12 opens an <ol>, so the browser numbers the items itself. Nobody typed "1." anywhere in the file.
  4. Line 9 renders nothing. A whole <h2> sits commented out — present in the file, absent from the page. The counter clearly stopped selling fried snacks and simply switched the section off. If you caught all four: you didn't just read code, you executed it in your head. That skill is the whole point of today.

Idea six

Images — and the attribute that speaks when pictures can't.

One tag puts a picture on a page: <img>. It's a void tag — nothing to wrap, nothing to close — and it depends completely on two attributes: src, which says where the picture is, and alt, which says what the picture means.

MINI PROBLEM · DISH.HTML
PROBLEM
Put today's special dish photo on a page — and make the page still say something useful to everyone who can't see the photo: screen-reader users, slow hostel Wi-Fi, and search engines.
REQUIRE­MENTS
  • Save as dish.html inside class-03 · title text: Dish of the Day
  • <h1>, then an <img> with src="assets/ragi-sangati.jpg" (a relative path — it starts from where dish.html lives)
  • An alt that genuinely describes the dish — not alt="image"
  • One caption paragraph under the image
EXPECTED OUTPUT
Heading, photo, caption. If the image fails to load (or the photo isn't in your sandbox yet), the browser shows your alt text in its place — the page stays meaningful either way.
dish.html
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>Dish of the Day</title>
6 </head>
7 <body>
8 <h1>Dish of the Day</h1>
9 <img src="assets/ragi-sangati.jpg"
10 alt="Ragi sangati bowl served hot
11 with ulava charu">
12 <p>Ragi Sangati Bowl — today's special.</p>
13 </body>
14</html>
file:///C:/Users/student/Desktop/fswd-practice/class-03/dish.html
Dish of the Day
ragi-sangati.jpg renders here — the photo joins your sandbox next class

Ragi Sangati Bowl — today's special.

src points at a file inside an assets folder next to the page. The path is relative — it starts from where THIS file lives.
SAVE THIS AS — TYPE IT EXACTLY
FOLDERC:\Users\student\Desktop\fswd-practice\class-03\
FILENAMEdish.html
EDITORVS Code — Ctrl+S to save
VIEW ITRight-click the file in VS Code's explorer, then Open with Live Server — until the photo joins your sandbox next class, your alt text renders in its place. That's the safety net working, not a bug.

Who reads your alt text? More people than you think.

A student using a screen reader

Hears your alt text read aloud in place of the image. With it, they order lunch like everyone else. Without it, the reader says "image" — a menu of ten dishes becomes "image, image, image" ten times.

Anyone on hostel Wi-Fi at 9 pm

When the image fails to load — slow network, broken path, renamed file — the browser renders the alt text in its place. Your page degrades to something still usable instead of a broken-picture icon.

Search engines

A crawler cannot see your photo. Your alt text is what tells it this page shows a ragi sangati bowl — which is how a hungry student searching for one finds your site at all.

Writing alt that earns its place

alt="image" — says nothing a broken-picture icon doesn't already say. alt="photo of food" — which food? A fried snack? The entire point is lost. alt="Ragi sangati bowl served hot with ulava charu" — a person who can't see the photo now knows exactly what's on offer. alt="" — empty, on purpose, for purely decorative images: it tells a screen reader "skip this, it carries no meaning." Deliberate silence is also a choice.
This is the first accessibility decision of your career. It won't be the last.

Notice what just happened: a page that looks identical either includes or excludes people, depending on one attribute you can't even see in the render. Building for people who browse differently than you do is a thread that runs through this entire course — it starts here, on your very first image, on the very first day you could make the choice.

EXTRA DEPTH · SEE ALT DO ITS JOB

Want to watch the safety net catch a fall? In dish.html, change line 9's src to a filename that doesn't exist — assets/wrong-name.jpg — and reload. The photo vanishes; your alt text appears in its place. Fix the path, reload, and the photo returns. You've just debugged the single most common image bug on the web: the path that points at nothing.

A quiet detail worth noticing: lines 9–11 are one tag spread across three lines. HTML allows that — the tag ends at the >, not at the end of a line. When attributes get long, wrapping them keeps code readable.

Your turn · a real repair job

The case of the swallowed menu.

READ THE RENDER · FIND THE WOUND

The canteen's weekend-specials page shipped last night, and this morning it looks wrong — everything below the title has ballooned to heading size. Here is the exact file and the exact render. The bug is one missing thing on one line. Your job: work out what's missing using only what the render is telling you — then type the file, reproduce the damage, and repair it yourself.

specials.html
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <title>Weekend Specials</title>
6 </head>
7 <body>
8 <h1>Weekend Specials
9 <p>Saturday and Sunday only — order by 11 am.</p>
10 <ul>
11 <li>Ragi Idli Bowl</li>
12 <li>Gongura Sprouts Salad</li>
13 </ul>
14 </body>
15</html>
file:///C:/Users/student/Desktop/fswd-practice/class-03/specials.html
Weekend Specials

Saturday and Sunday only — order by 11 am.

  • Ragi Idli Bowl
  • Gongura Sprouts Salad
This is the whole crime scene. Notice what the browser did NOT give you: no error, no warning, no red text. The page simply went wrong, silently.
How a developer reads a render like this

Don't stare at the code first — interrogate the symptom. Three questions crack it: 1) What property went wrong? Everything is huge and bold — that's heading styling. 2) Where does the damage start? The title itself looks right; the wrongness begins immediately after it and never stops. 3) What kind of bug behaves like that? Something that opened and never closed — because everything that follows falls inside it and inherits its look. Now read line 8 again, character by character, against line 8 of menu.html.

SAVE THIS AS — TYPE IT EXACTLY, BUG INCLUDED
FOLDERC:\Users\student\Desktop\fswd-practice\class-03\
FILENAMEspecials.html
EDITORVS Code — Ctrl+S to save
VIEW ITRight-click the file in VS Code's explorer, then Open with Live Server — reproduce the broken render first, then fix it and watch it snap back
EXTRA DEPTH · WHY THERE'S NO ERROR MESSAGE — AND WHY THAT'S DELIBERATE

In most programming languages, a missing closer is a hard stop: the program refuses to run and points at the guilty line. HTML made the opposite bet. The web's founding rule was never show a blank page — a browser that refused to render every imperfect file would have refused half the early web. So when Chrome hit the unclosed <h1>, it didn't stop; it guessed. It decided the paragraph and the whole list must belong inside the heading, adopted them as its children, and rendered that guess with a straight face.

That bet is why HTML debugging is a skill of the eyes, not of error messages. Your compiler is the render itself — and today's three questions (what property went wrong, where does the change start, what opens-but-never-closes behaves this way) are the same three you'll use on real projects for years. One more tool from earlier today: if reading doesn't find it, comment out line 8, reload, and watch the problem vanish — you've found your line.

The repair

One line, five characters, whole page restored.

Write your diagnosis down first — the render gave you everything you need.

BROKEN — AS SHIPPED
specials.html
7 <body>
8 <h1>Weekend Specials
9 <p>Saturday and Sunday only…</p>
10 <ul>
11 <li>Ragi Idli Bowl</li>
12 <li>Gongura Sprouts Salad</li>
13 </ul>
14 </body>
FIXED — ONE CLOSER ADDED
specials.html
7 <body>
8 <h1>Weekend Specials</h1>
9 <p>Saturday and Sunday only…</p>
10 <ul>
11 <li>Ragi Idli Bowl</li>
12 <li>Gongura Sprouts Salad</li>
13 </ul>
14 </body>
file:///C:/Users/student/Desktop/fswd-practice/class-03/specials.html
Weekend Specials

Saturday and Sunday only — order by 11 am.

  • Ragi Idli Bowl
  • Gongura Sprouts Salad
After the fix: the heading keeps its size, and the paragraph and list stand on their own again.
What the browser was actually thinking

With no </h1>, the browser had to decide where the heading ends — and its rule is "keep swallowing until something forces me to stop." The paragraph didn't force it. The list didn't force it. So they became the heading's children, and children inherit their parent's presentation: heading-sized, heading-bold. The moment you type the five characters </h1>, the heading's territory ends on line 8, and everything after it stands on its own again. Every opened tag claims a territory — the closer is what says where that territory stops.

Before moving on, make sure you can say yes to these:
  1. Could you name the symptom family? "Everything after point X inherits a look it shouldn't have" almost always means an unclosed tag at point X. File that pattern away — it pays for itself many times this semester.
  2. Did you catch it from the render alone? If you needed the code side, that's fine today — but re-run the three questions until the render alone is enough. That's the skill being built.
  3. Did you reproduce it in your own sandbox? Typing the bug, watching it break, and fixing it teaches your fingers what your eyes just learned. Ten minutes, and unclosed-tag bugs lose their power over you permanently.
AFTER CLASS · AT YOUR OWN PACE

Three small tags worth meeting before they meet you.

None of these need a full lesson — but all three appear in real pages and in exam papers, so ten quiet minutes of self-study buys you recognition forever. Each row shows the tag, its job, and exactly what it renders as.

QUICK REFERENCE · TRY EACH ONE IN YOUR SANDBOX
<blockquote>
A quotation long enough to stand as its own block. The browser indents it away from your own words — the visual signal for "someone else said this." Wrap the quoted text: <blockquote>Best millet bowl on campus.</blockquote>
Best millet bowl on campus.
<sub> · <sup>
Subscript sinks below the line, superscript floats above it. Chemistry, maths, footnote markers: H<sub>2</sub>O and x<sup>2</sup>
H2O  ·  x2  ·  note1
<hr>
A horizontal rule — a full-width line marking a change of topic. Void tag, like <br> and <img>: nothing to close. Just <hr> on its own line.
Breakfast menu
Lunch menu
The five-minute drill that makes these stick

Open a new file, small-tags.html, in your class-03 folder — full skeleton first, as always. Give it one blockquote (a real review a friend might write about your canteen), one line of chemistry, one squared number, and an <hr> between two menu sections. You now know eleven tags — enough to mark up most of a real page's text.

Idea seven · a habit, declared once

Indentation: the house style we keep from here forward.

Look back at every code panel today — none of it was flat against the left margin. That shape wasn't decoration. The browser ignores indentation completely (whitespace collapsing, remember) — it exists purely for human readers. And you just spent a whole debugging drill being one.

1
Two spaces per level of nesting.

Not a tab, not four — two, every time. VS Code's default matches. What matters most isn't the number, it's that the whole file (and this whole course) agrees on one.

2
A child sits one level deeper than its parent.

<head> and <body> sit inside <html>, so they indent one step. An <li> lives inside a <ul>, so it steps in once more. Depth on the screen equals depth in the structure.

3
Siblings line up on the same column.

All ten menu <li>s in menu.html start at the same column — your eye reads them as one family at a glance, before reading a single word.

4
A closing tag lands on its opener's column.

</ul> directly below its <ul>, </body> below <body>. Scan straight down from any opener and its closer is waiting on the same vertical line — or it's missing, and now you can see that.

Why it earns its keep: reading

Well-indented HTML is a picture of its own structure — parents, children, and siblings visible as pure shape. Flat HTML is a wall where every relationship must be worked out tag by tag. Same file, same render; wildly different cost to every human who touches it after you.

Why it earns its keep: debugging

Today's swallowed-menu bug is visible as a shape in well-indented code: an opener whose column never gets its closer back. Indent honestly and half your future unclosed-tag bugs get caught by your eyes before the browser ever sees them. Sloppy indentation doesn't break pages — it hides the things that do.

HOUSE STYLE, FROM TODAY

Every snippet in this course follows these four rules from here to the final class — and so does every file you submit. Not because tidy code scores marks by itself, but because in a few weeks your pages will be fifty lines deep in nested tags, and the habit you build on ten-line files is the only thing that makes fifty-line files readable. Start now, while it's cheap.

EXTRA DEPTH · LET THE EDITOR DO IT

VS Code will indent as you type, and it can repair a messy file in one stroke: right-click anywhere in the editor and choose Format Document (or Shift+Alt+F). Try it: paste your menu.html with all the indentation deliberately mangled, format, and watch the structure snap back. The editor automates the habit — but it can only format a file whose tags are correctly opened and closed, which is one more quiet reason the closers matter.

Wrapping up

Sixty minutes ago, tags were mysterious. Now you read them like a menu.

I can write the full HTML skeleton from memory and explain what every one of its six lines does.
I choose h1–h6 by rank, never by size — one h1 per page, sections under it.
I know when a thought needs a new <p>, when a line needs <br>, and why <strong> and <em> carry meaning, not looks.
I can switch code off with comments instead of deleting it — my first debugging tool.
I can build both list types, and I put alt text on every image because I know exactly who reads it.
I diagnosed a silently-broken page from its render alone — no error message needed.
YOUR SANDBOX AFTER TODAY

fswd-practice\class-03\ now holds eight files: skeleton.html · headings.html · text-tags.html · comments.html · menu.html · predict.html · dish.html · specials.html — plus small-tags.html if you did the self-study drill. Don't delete any of them; Class 4 builds directly on this folder, and menu.html in particular has a long life ahead of it.

YOUR FOLDERS AFTER TODAY — CHECK BEFORE YOU LEAVE
Desktop\fswd-practice\ <- sandbox · NOT a git repo · never committed
│ class-02\ <- last class, untouched
└─ class-03\ <- created today · 8 files
├─ skeleton.html
├─ headings.html
├─ text-tags.html
├─ comments.html
├─ menu.html <- grows again in Class 4
├─ predict.html
├─ dish.html
└─ specials.html
Desktop\poshtik-campus\ <- real project · becomes a git repo in Lab 1 · untouched today
GIT?fswd-practice\ is scratch paper: no repo, no commits, delete freely. poshtik-campus\ is the real project that goes under git in Lab 1. Today every file landed in the sandbox, so today needs zero commits.
BEFORE NEXT CLASS · BUILD

Make about-me.html in class-03\:

  • Full skeleton.
  • Your name in the <h1>.
  • An <h2> per section (branch, hobbies, favourite canteen order).
  • One paragraph with a <strong> and an <em> used for their meaning.
  • One list of each type.
BEFORE NEXT CLASS · BREAK

Sabotage a copy of menu.html: remove one closing tag — your choice which — and study the render before fixing it. Do this three times with three different tags. You're building a private catalogue of what each breakage looks like.

BEFORE NEXT CLASS · READ

On any real site you visit after class, press Ctrl+U and spend two minutes in the source. Count how many of today's eleven tags you can spot in the first screen. Real pages are longer — but they are made of exactly what you learned today.

EXIT TICKET · ANSWER BEFORE YOU LEAVE

A friend's page shows their whole footer in giant bold text, and there's no error anywhere. In one sentence: what family of bug do you suspect, and what's the first thing you'd look for in their code?