HTML & CSS
/Beginner
HTML Interview Questions
Definition
Common questions asked during front-end interviews to test foundational HTML knowledge.
Explain Like I'm New
Interviewers use these to check if you skipped the basics and went straight to React. They want to know if you understand accessibility, SEO, and document structure.
Real World Example
Being asked the difference between a `<div>` and a `<span>`, or why the `alt` attribute exists.
Common Use Cases
- •Junior/Mid Front-End Developer Interviews
Terminal Output
bash / terminal
/*
Q: Explain Semantic HTML and give an example of why it matters.
A: Semantic HTML means using tags that describe the MEANING of the content,
not just how it looks.
Example: Using a <button> instead of a <div class="btn">.
Why it matters:
1. Accessibility: Screen readers know a <button> can be clicked, but
they think a <div> is just plain text.
2. Usability: A <button> natively supports keyboard navigation (Tab key)
and the 'Enter' key to trigger clicks. A <div> does not.
3. SEO: Search engines understand the structure of the page better when
you use <article>, <nav>, and <footer>.
*/
Interview Questions
basic
- What is the difference between a `<div>` and a `<span>`?
intermediate
- What is the difference between `<script defer>` and `<script async>`?