HTML Errors & Edge Cases
What the parser does when you get it wrong: unclosed tags, void elements written as containers, blocks inside paragraphs, and text foster-parented out of a table. Every item shows the tree you actually got rather than the one you wrote.
Who it is for
Writes the happy path well.
The behaviour people get wrong after they are already productive in the language.
You will get the most out of it if you have written HTML recently enough to read it without effort, and have been surprised by it at least once. If you are picking the language up for the first time, start with HTML Essentials and come back to this one.
It is also built for interview preparation: the questions are the ones that get asked because they separate people who have read the documentation from people who have hit the behaviour in production.
How long it takes
90 graded questions at roughly 45 seconds each is about 68 minutes of answering in total.
At the default five questions a day, and because the session mixes in your other courses, expect around 18 days — call it 3 weeks — to see everything once, plus a few weeks of thinning reviews after that before it is all mastered.
A question is mastered on the third correct answer, once the gap between reviews has grown past a week — so a course cannot be finished in a weekend however long you sit with it.
Question mix
- 60 multiple choice
- 10 concept cards
- 10 predict the output
- 10 put it in order
- 10 matching questions
Syllabus
What you will be asked about
-
01
Tags You Forgot to Close
Work out where an unclosed element ends, and what it takes with it on the way.
-
02
End Tags That Were Never Required
Tell a legally omitted end tag apart from one you actually forgot.
-
03
Void Elements Written as Containers
Predict what an end tag on a void element does, including the one that adds an element.
-
04
Foster Parenting Out of Tables
Predict where content that does not belong in a table ends up, and what gets dropped entirely.
-
05
Misnested Tags & the Adoption Agency
Predict the tree when formatting elements overlap instead of nesting.
-
06
Blocks Inside a Paragraph
Explain why a paragraph ends early, and where the empty paragraphs come from.
-
07
Duplicate and Broken ids
Predict which element wins when an id is not unique, and what quietly breaks.
-
08
Interactive Inside Interactive
Spot the nesting the parser repairs, the nesting it leaves alone, and why the second is worse.
-
09
Stray Tags, Text & Attributes
Say what happens to a token that arrives where nothing can accept it.
-
10
Quirks Mode & What Errors Cost
Say what the doctype switches on, and which parse errors reach a user rather than a validator.
8 more topics, and all 90 questions
HTML Errors & Edge Cases is a Pro course. One subscription opens it and every other course in the catalogue, including the ones still being written.
A question from this course
Tags You Forgot to Close
Where does the second div end up?
<div>
<b>Note
<div>Next section</div>
</div>
Show the answer
D Inside the b element, because nothing closed it first
It feels as though a block-level element must terminate an inline one - that is how the two behave in CSS. The parser has no such rule for b: it stays on the stack, so the whole next section becomes its descendant and inherits bold. The outer </div> is what finally pops it, one element later than you meant.
The rest of the track
HTML at every depth
HTML Essentials
Ten topics on the markup you already recognise and the behaviour underneath it: what the parser does with a tag you left open, which controls a form actually submits, and why an empty alt is sometimes right and sometimes the bug.
HTML Core
Forms as they actually serialise, tables with real headers, and the head you copy without reading. Ten topics on the markup you write every day and the parts of it that do not behave the way the tag name suggests.
HTML Idioms & Pitfalls
The markup people write out of habit that is wrong or wasteful. Div soup, lists that are not lists, headings used for size, ARIA that overrides what the element already said, and alt text that describes the wrong thing.
HTML Advanced
Insertion modes, inert templates, shadow boundaries and slot assignment, custom element upgrade timing, and what each iframe sandbox token actually permits. The parts that still catch authors who have written HTML for years.
HTML Interview Questions
What interviewers ask about markup and what the honest answer is: the accessibility tree against the DOM tree, constraint validation, parser error recovery, resource loading order, and the perennial "what does this render".
Start HTML Errors & Edge Cases
in tomorrow’s session.
Enrol and this course joins your daily five, mixed in with everything else you are studying — 90 questions spread over about 18 days rather than dropped on you at once.
Browse the catalogue