Learn HTML: 100 practical questions and answers
Clear explanations, focused examples, and a practical way to check each result.
Learn HTML in a useful order
Choose a route, work through the linked explanations, then try the practice task. These are learning sequences, not a qualification or certification.
Build your first page
- What belongs in a minimal HTML document?
- When should you use id instead of class?
- What does semantic HTML mean in practice?
- How should headings describe a page hierarchy?
- How do you add a skip link to main content?
Practice: build a one-page article with a clear heading hierarchy, unique IDs, and a keyboard-accessible skip link.
Make a usable form
- How do you connect a label to an input?
- Why is a field missing from submitted form data?
- How does required participate in browser validation?
- How do you associate field help text with an input?
- How do fieldset and legend clarify grouped choices?
Practice: build a labeled form, explain required fields, connect help text, and compare submitted values with the fields on screen.
Present images and data
- How do you write useful alternative text?
- How does srcset help choose a responsive image?
- Why set width and height on responsive images?
- What is the basic structure of a data table?
- How does scope clarify table headers?
Practice: add a responsive image and a small data table. Check the alternative text, reserved image space and table header relationships.
Debug and prepare to share
- How do you write a useful page title?
- When does a page need a canonical link?
- How do defer and async affect classic scripts?
- How do you start debugging invalid HTML?
- What should you check before sharing an HTML project?
Practice: validate a complete document, inspect resource requests and metadata, then test keyboard access and a phone-sized layout.
About these guides
AI-assisted explanations and examples by HTMLCodeRunner Editorial. These are editorial learning discussions, not independent member conversations. You can add your own questions and corrections.
HTML Basics10 guides
- What belongs in a minimal HTML document?
- Why does an HTML page need a doctype?
- What is the difference between head and body?
- How do HTML attributes configure elements?
- How do you write comments in HTML safely?
- How do you display angle brackets as text?
- When should you use id instead of class?
- Why are extra spaces collapsed in HTML text?
- Why does disabled="false" still disable an input?
- How do you declare the language of an HTML page?
Semantic HTML10 guides
- What does semantic HTML mean in practice?
- When should you choose article instead of section?
- How should headings describe a page hierarchy?
- Can header and footer appear inside an article?
- Which groups of links belong in nav?
- When does a sidebar belong in aside?
- What is the practical difference between div and span?
- When should you use strong rather than em?
- How do figure and figcaption describe an illustration?
- Why use datetime on a time element?
HTML Forms10 guides
- When should an HTML form use GET or POST?
- How do you connect a label to an input?
- Why is a field missing from submitted form data?
- How does required participate in browser validation?
- Does type="email" prove an email address exists?
- What does a form need to upload a file?
- How do radio buttons form an exclusive choice group?
- How do you give a required select a prompt?
- How do you set initial text in a textarea?
- Why does my preview button submit the form?
Images & Media10 guides
- How do you write useful alternative text?
- How does srcset help choose a responsive image?
- When should you use picture instead of img alone?
- Which images should use loading="lazy"?
- Why set width and height on responsive images?
- How do you add video with native controls?
- How do you embed an accessible audio lesson?
- What does track add to an HTML video?
- Should an SVG be inline or embedded as an image?
- Does canvas automatically expose document semantics?
Tables & Lists10 guides
- What is the basic structure of a data table?
- How do you name a table with caption?
- How does scope clarify table headers?
- How do colspan and rowspan change a table grid?
- Why use row groups in an HTML table?
- When is an unordered list appropriate?
- How do you continue ordered-list numbering?
- Where does a nested list belong?
- When should you use dl, dt, and dd?
- How do you make a wide table usable on a phone?
HTML SEO & Metadata10 guides
- How do you write a useful page title?
- What should a meta description say?
- Where should you declare UTF-8?
- Why does a mobile page need viewport metadata?
- When does a page need a canonical link?
- What does a robots noindex meta tag do?
- How do you reference a favicon in HTML?
- How do you identify alternate language pages?
- Can structured data create a rich result on its own?
- What makes an HTML link useful for discovery?
HTML Accessibility10 guides
- How do you add a skip link to main content?
- Why prefer a native button to a clickable div?
- When should tabindex be zero or minus one?
- When is aria-label appropriate?
- How do you associate field help text with an input?
- How are hidden and aria-hidden different?
- How do fieldset and legend clarify grouped choices?
- How do you create a native disclosure?
- How do you open a modal dialog correctly?
- When is inert useful in an HTML interface?
HTML APIs & Embeds10 guides
- How should you label an embedded iframe?
- What does sandbox restrict in an iframe?
- How do you display an HTML string with srcdoc?
- How do defer and async affect classic scripts?
- What changes when a script uses type=module?
- Why does template content not appear immediately?
- How do data attributes connect markup and JavaScript?
- What does contenteditable provide and what is still missing?
- How are progress and meter different?
- When are datalist suggestions useful?
HTML Debugging & Projects10 guides
- How do you start debugging invalid HTML?
- Why does the browser move elements out of a paragraph?
- How can repeated components introduce duplicate IDs?
- Why is an image broken even though its file exists?
- How do you debug garbled characters in HTML?
- How do you show HTML code without executing it?
- Why does an HTML contact form not send mail by itself?
- Why is my external stylesheet not applied?
- How do you debug an external script that does not run?
- What should you check before sharing an HTML project?