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".
Who it is for
Preparing, and short of time.
For someone confident in the language who wants the traps, the edge cases and the interview questions.
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
Semantics That Actually Change Behaviour
Say what a semantic element buys you at runtime, and which semantic claims are folklore.
-
02
The Accessibility Tree
Predict what assistive technology receives from a piece of markup, and where it diverges from the DOM.
-
03
Forms & Constraint Validation
Predict what a form submits and what the browser validates, before any script runs.
-
04
How The Parser Recovers
Predict the DOM an HTML parser builds from markup that is wrong, since it never refuses to build one.
-
05
Resource Loading & Performance
Say when each resource is fetched, when it executes, and what it blocks in between.
-
06
Head Metadata & The SEO Facts
Separate the metadata that changes browser or crawler behaviour from the folklore that does not.
-
07
Sandboxing, rel Tokens & Embedding
Reason about what a piece of markup grants to code you do not control.
-
08
Responsive Images & Media
Choose between srcset, sizes and picture, and say what the browser is allowed to do with each.
-
09
What Does This Actually Render?
Read a fragment and say what the user sees, what is in the DOM, and why those differ.
-
10
Attributes, Properties & The DOM
Tell an attribute from a property, and predict which one the browser and your code are reading.
8 more topics, and all 90 questions
HTML Interview Questions 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
Semantics That Actually Change Behaviour
Which of these two controls still falls short of a real button?
<div role="button" tabindex="0">Save</div>
<button>Save</button>
Show the answer
A The div: role and tabindex give it a name and focus, but not Enter/Space activation or the disabled state
You may have been taught that role plus tabindex makes a div equivalent, because it exposes the right role and takes focus. It does not: keyboard activation is still yours to write, Enter and Space behave differently, and there is no disabled state, no form submission and no forced-colours styling. The ARIA rule is the shorter answer in an interview - if a native element exists, use it.
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 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.
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.
Start HTML Interview Questions
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