The document layer

HTML Interview Questions

Semantics, forms, metadata and accessibility. The HTML decisions that shape SEO, keyboard support and maintainable UI.

Quiz me
40 questions10 easy22 medium8 hard0/40 learned
01What is HTML and what is it responsible for?Easyhtml · markup · web platform02What is the structure of a valid HTML document?Easydocument structure · doctype · head03What is semantic HTML and why does it matter?Easysemantics · accessibility · seo04How should headings be structured on a page?Easyheadings · document outline · accessibility05How do links and anchors work in HTML?Easylinks · href · navigation06How do you write good alt text for images?Easyimages · alt text · accessibility07When should you use ul, ol and dl?Easylists · structure · accessibility08How do you build an accessible HTML table?Mediumtables · headers · accessibility09How do HTML forms and inputs work together?Hardforms · inputs · submission10How do you connect labels to form controls?Mediumlabels · forms · accessibility11Why does the input type matter?Mediuminput types · forms · mobile12How does native form validation work?Mediumvalidation · forms · constraints13When should you use a button instead of a link?Easybuttons · links · accessibility14What is the difference between block and inline elements?Easydisplay · layout · css15What is the difference between div and span?Easydiv · span · semantics16What semantic elements did HTML5 add?Mediumhtml5 · semantics · structure17What is the difference between section, article and aside?Hardsection · article · aside18How should header, footer, nav and main be used?Mediumlandmarks · page structure · navigation19What are meta tags used for?Mediummeta tags · metadata · seo20What is document metadata and where does it go?Mediummetadata · head · title21What does the viewport meta tag do?Mediumviewport · responsive · mobile22Which HTML choices matter most for SEO?Mediumseo · metadata · crawlability23What is the difference between canonical tags and robots directives?Mediumcanonical · robots · indexing24What are Open Graph tags and how are they used?Mediumopen graph · social · metadata25What is structured data and how does JSON-LD work?Hardstructured data · json-ld · schema.org26How do iframes work and what should you watch out for?Mediumiframes · embedding · security27How do you embed audio and video accessibly?Mediummedia · audio · video · captions28When would you use canvas instead of SVG?Mediumcanvas · svg · graphics29What is the difference between normal, defer and async scripts?Hardscripts · defer · async · parsing30When should you use data attributes?Mediumdata attributes · dataset · javascript31What are the basics of ARIA and when should you use it?Mediumaria · accessibility · roles32What are accessibility landmarks and why do they matter?Mediumlandmarks · aria · navigation33How does tabindex affect focus order?Mediumtabindex · focus · keyboard34What is the difference between hidden and aria-hidden?Hardhidden · aria-hidden · accessibility tree35What is the template element used for?Mediumtemplate · dom · javascript36How do details and summary work?Mediumdetails · summary · disclosure37How does the dialog element work?Harddialog · modal · focus38How does lazy loading work for images?Mediumlazy loading · images · performance39How do srcset, sizes and picture work?Hardresponsive images · srcset · picture40What are the most common HTML mistakes you see?Hardcommon mistakes · semantics · accessibility

Reading is step one

Now say it out loud.

Understanding an answer and delivering it under pressure are different skills. Rehearse this topic in a live HTML mock interview and get scored feedback on depth, clarity and confidence.