Interview Q&A · questions with model answers

HTML & CSS Interview Questions

Part of the study plan for: Frontend Engineer · Full Stack Engineer

Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.

  1. How do responsive images work with srcset, sizes and picture?

    srcset lists image files with their widths (400w, 800w) and sizes tells the browser how wide the image will display, so it downloads the smallest suitable file for the screen and pixel density.…

  2. How should headings be structured on a page?

    Use one h1 for the page's main topic, then h2 to h6 nested in order without skipping levels, each introducing the content below it. Choose levels by structure, not by size; style with CSS.

  3. Is target="_blank" on links a security risk?

    Historically yes: the opened page could use window.opener to redirect the original tab (reverse tabnabbing), so rel="noopener" was required. Modern browsers now treat target="_blank" as noopener by…

  4. Who maintains HTML today, and what is the Living Standard?

    The WHATWG (a group formed by browser makers in 2004) maintains the HTML Living Standard. Since 2019 the W3C and WHATWG have agreed on this single specification, which is updated continuously rather…

Was this page helpful?

Report a mistake