22 questions with answers
HTML questions are often where interviewers check your accessibility and fundamentals: semantic elements, forms, script loading, metadata and how the browser turns markup into a page. Senior candidates are expected to connect markup choices to accessibility, performance and SEO.
2.How does the native <dialog> element work, and what does showModal() give you over a custom modal?
Top layer, inertness, focus handling, Escape, ::backdrop, form method=dialog and remaining gaps.
4.HTML Serializer
Turn a plain-object element tree into pretty-printed, correctly escaped HTML with indentation and void elements.
5.How do ARIA live regions work, and how do you announce dynamic updates reliably?
polite vs assertive, status and alert roles, aria-atomic, timing pitfalls and an announcer pattern.
6.Consider HTML5 as an open web platform. What are the building blocks of HTML5?
- Semantics - Allowing you to describe more precisely what your content is.
14.What are data- attributes good for?
Before JavaScript frameworks became popular, front end developers used data- attributes to store extra data within the DOM itself, without other hacks such as n
15.What are empty elements in HTML?
Empty elements in HTML are elements that do not contain any content between their opening and closing tags. Instead, they are self-closing tags, meaning they ha
16.What does a DOCTYPE do?
DOCTYPE is an abbreviation for Document Type. A DOCTYPE is always associated to a DTD - for Document Type Definition.
17.What is progressive rendering?
Progressive rendering is the name given to techniques used to improve the performance of a webpage (in particular, improve perceived load time) to render conten