HTML Interview10 Q&A

HTML Semantic Interview

Interview questions on semantic tags, document meaning, and accessibility impact.

1What is semantic HTML?easy
Answer: Semantic HTML uses meaningful elements that describe content purpose, not just presentation.
2Why is semantic HTML important?medium
Answer: It improves accessibility, maintainability, and search engine understanding.
3Examples of semantic elements?easy
Answer: header, nav, main, section, article, aside, footer.
4section vs article?medium
Answer: section groups related thematic content; article is self-contained reusable content.
5When to use main?easy
Answer: For the primary unique content of the page, typically once per document.
6Is div semantic?easy
Answer: No. div is non-semantic generic container.
7How semantics help screen readers?medium
Answer: Landmarks and meaningful structure improve navigation and context.
8Can semantics affect SEO?medium
Answer: Yes, clearer structure helps crawlers interpret content relevance better.
9Heading hierarchy relation with semantics?medium
Answer: Proper heading order reinforces document structure and accessibility.
10Interview best-practice summary?medium
Answer: Prefer semantic elements first, use non-semantic containers only when necessary.
Tricky Q&A (10 Questions)
11Semantic HTML primarily describes:tricky
Answer: Correct answer: Meaning and role of content. Semantic tags convey purpose, not just appearance.
12Which element is for primary page content?tricky
Answer: Correct answer: main. main holds unique central content.
13article element suits:tricky
Answer: Correct answer: Standalone blog post. article is for self-contained compositions.
14nav element should contain:tricky
Answer: Correct answer: Major navigation links. nav wraps navigation sections.
15header can appear:tricky
Answer: Correct answer: In page or inside sections/articles. header can introduce page or section content.
16footer often includes:tricky
Answer: Correct answer: Copyright and related links. footer holds ancillary info for its section.
17aside is for:tricky
Answer: Correct answer: Sidebar/tangential content. aside is related but not core content.
18section element groups:tricky
Answer: Correct answer: Thematic content with heading. section groups related thematic content.
19figure + figcaption used for:tricky
Answer: Correct answer: Illustrations with captions. figure captions media/charts via figcaption.
20Using div for everything hurts:tricky
Answer: Correct answer: Accessibility and SEO structure clarity. Generic divs lack landmark/semantic cues.