Last updated: June 26, 2026
10 of 10 questions
Semantic HTML uses elements that describe their meaning (header, nav, article) rather than generic divs, improving accessibility, SEO, and maintainability.
Block elements start on a new line and take full width; inline elements flow within text and only take the width of their content.
It tells the browser to render in standards mode using the modern HTML5 parsing rules, avoiding inconsistent legacy "quirks mode" behaviour.
The viewport meta enables responsive layout, the title and description drive search snippets, and Open Graph tags control social sharing previews.
Associate every input with a label, group related fields with fieldset/legend, use proper input types, and surface validation errors programmatically.
data-* attributes store custom data on elements, accessible via the dataset API, useful for passing state to JS without abusing classes or IDs.
Use responsive srcset/sizes, modern formats, explicit width/height to prevent layout shift, and loading="lazy" for offscreen images.
ARIA adds roles, states, and properties to convey accessibility info HTML can’t express natively — but native semantic elements are always preferred.
Cookies are sent with every request and suit auth; localStorage persists with no expiry; sessionStorage clears when the tab closes. Neither storage is sent to servers.
Progressive enhancement builds a functional baseline with semantic HTML first, then layers CSS and JS so the core works even if scripts fail.
Upload your resume and get an instant ATS score with keyword gaps — free, no sign-up.
CSS Interview Questions
10 questions
JavaScript Interview Questions
50 questions
React Interview Questions