All 49 questions
What is semantic HTML, and how do you choose appropriate elements instead of generic divs?
Asked in 7 of 157 interviews · last asked Sep 22 · Concept · Junior
Show answer
Semantic HTML uses elements that describe the meaning of content, not just its appearance. I choose elements by their purpose: nav for major navigation, main for the main content, and button for an action. I use div when no meaningful element fits. This gives browsers and assistive tools useful information about the page.
- Choose elements by meaning, not by their default appearance; use CSS for styling.
- Use links for navigation and buttons for actions.
- Use article for self-contained content and section for a distinct topic, usually with a heading.
- Semantic elements support accessibility, but do not make a page accessible on their own.
What the interviewer checks: The interviewer checks whether you can match content and behavior to suitable HTML elements and explain their accessibility value.
Other ways it was asked
- “What are semantic HTML elements, and why are they useful?”
- “What is semantic HTML, and why is it important?”
- “What are semantic HTML elements, and why do we even need them if we can build the UI without them?”
What is HTML?
Asked in 3 of 157 interviews · last asked Oct 19 · Concept · Junior
Show answer
HTML stands for HyperText Markup Language. It is the standard markup language used to structure content on web pages. It uses elements to describe content such as headings, paragraphs, links, and images.
- HTML is a markup language, not a programming language.
- Elements give content structure and meaning.
- CSS controls presentation, while JavaScript adds behavior.
What the interviewer checks: The interviewer is checking whether you understand HTML’s role and how it differs from CSS and JavaScript.
What is the DOCTYPE declaration?
Asked in 3 of 157 interviews · last asked Aug 27 · Concept · Junior
Show answer
The DOCTYPE declaration tells the browser how to render an HTML document. In modern HTML, `<!DOCTYPE html>` selects standards mode, so the browser follows modern HTML and CSS rules. Without it, the browser may use quirks mode, which applies older layout rules.
- Place `<!DOCTYPE html>` at the start of the document, before the `<html>` element.
- It is a declaration, not an HTML element.
- Standards mode helps avoid unexpected layout differences caused by quirks mode.
What the interviewer checks: The interviewer checks whether you understand how DOCTYPE affects browser rendering.
Other ways it was asked
- “Why do we use a DOCTYPE declaration?”
- “What does the doctype declaration do in an HTML document?”
- “What does a DOCTYPE declaration tell the browser?”
How would you structure a semantic card component, including headings and choosing article, section, or div?
Asked in 2 of 157 interviews · last asked Jul 26 · Concept · Mid-level
Show answer
Use `article` for a self-contained card, such as a blog post preview. Use `section` for a distinct topic in the page, usually with a heading. Use `div` when you only need a layout wrapper. Give the card a heading level that fits the page hierarchy, not its visual size.
- Choose the element by the content’s meaning, not the card’s appearance.
- An article or section does not automatically reset heading levels.
- Let reusable cards accept a heading level that matches their placement.
- Use CSS to style headings without changing their semantic level.
Code<section> <h2>Latest posts</h2> <article> <h3><a href="/posts/semantic-html">Semantic HTML</a></h3> <p>Learn how to choose meaningful HTML elements.</p> </article> </section>What the interviewer checks: The interviewer is checking whether you choose meaningful elements and keep a clear heading hierarchy when reusing cards.
Other ways it was asked
- “When would you wrap a blog post card in an article element versus using a section or a div?”
- “How do you structure semantic HTML for a reusable card component, including its heading hierarchy and when to use a section versus an article?”
What is an iframe?
Asked in 2 of 157 interviews · last asked Jun 18 · Concept · Junior
Show answer
An `<iframe>` is an HTML element that embeds another web page inside the current page. The embedded page has its own document and browsing context. Common uses include videos, maps, and external widgets.
- The src attribute sets the page to load.
- Use a clear title attribute to describe the frame for screen reader users.
- The sandbox attribute can restrict what the embedded page can do.
- The same-origin policy limits script access between the parent page and a frame from another origin.
What the interviewer checks: The interviewer is checking whether you understand embedded pages and their separation from the parent page.
Other ways it was asked
- “What is the iframe tag?”
What is the purpose of the head section in HTML?
Asked in 2 of 157 interviews · last asked Oct 19 · Concept · Junior
Show answer
The <head> section holds information about the page and links to resources, rather than the main content shown on the page. It can include the page title, metadata, styles, and scripts. Browsers and search engines use this information to process and understand the page.
- The <title> sets the page title shown in the browser tab.
- Metadata can define the character encoding, page description, and viewport settings.
- The <head> can link stylesheets and include scripts; visible page content belongs in <body>.
What the interviewer checks: The interviewer is checking whether you understand the difference between page information in <head> and page content in <body>.
What are HTML attributes, and how are they used?
Asked in 2 of 157 interviews · last asked Sep 2 · Concept · Junior
Other ways it was asked
- “What are HTML data attributes, and how are they used?”
How do you add a comment in HTML?
Asked in 2 of 157 interviews · last asked Oct 19 · Concept · Junior
Other ways it was asked
- “Could you specify the exact syntax or tags used to add a comment in HTML?”
- “What are the exact delimiters used to add a comment in HTML?”
What is the purpose of the meta tag in HTML?
Asked in 2 of 157 interviews · last asked Aug 25 · Concept · Junior
Other ways it was asked
- “What are HTML meta tags, and what are they used for?”
When uploading a file through a form, what attributes are needed on the form tag?
Asked once · last asked May 9 · Concept · Junior
What are some of the new features introduced in HTML5 that enhance web application development?
Asked once · last asked May 23 · Concept · Junior
Can you elaborate on how you would use the Canvas element in a real-world project, and what kinds of applications could benefit from it?
Asked once · last asked May 23 · Tooling · Junior
What is the difference between the HTML <b> and <strong> tags?
Asked once · last asked Nov 21 · Concept · Junior
Other ways it was asked
- “What is the difference between the bold and strong tags?”
What content is typically placed in the HTML <head>, and what role does it serve, including metadata and CSS or JavaScript references?
Asked once · last asked Jul 27 · Concept · Junior
How do you render HTML and insert a variable into a Thymeleaf template?
Asked once · last asked Aug 7 · Tooling · Junior
What HTML form fields would you use to collect information for a career guidance tool?
Asked once · last asked Sep 19 · Tooling · Junior
How would you represent books in a reading application, including page numbers, text, and content formatting such as HTML?
Asked once · last asked Oct 22 · Design · Mid-level
Other ways it was asked
- “How should the books be represented? Are they just strings, or do they include page numbers and text? How should the content be formatted—for example, as HTML?”
How would you structure an icon, a heading, and a paragraph within a card using HTML?
Asked once · last asked Mar 20 · Scenario · Junior
Other ways it was asked
- “How would you use CSS to space an icon, a heading, and a paragraph within a card?”
What is a div tag, and what is it used for?
Asked once · last asked Aug 4 · Concept · Junior
Other ways it was asked
- “What is a div tag?”
Can you create a restaurant website using HTML, CSS, and JavaScript?
Asked once · last asked Feb 2 · Write code · Junior
What are HTML and CSS, and what roles do they play in web development?
Asked once · last asked Mar 7 · Concept · Junior
Why do we use HTML and CSS?
Asked once · last asked Apr 1 · Concept · Junior
Since we’re just starting to scale our business and only need a landing page, what can we start with?
Asked once · last asked Apr 11 · Scenario · Mid-level
What are some new tags in HTML?
Asked once · last asked May 9 · Concept · Junior
What is the purpose of the embed tag?
Asked once · last asked May 9 · Concept · Junior
Tell me about a web development topic you learned and still remember, and teach it to me now.
Asked once · last asked May 16 · Concept · Junior
How would you explain your rule for choosing semantic HTML elements, with a concrete page example?
Asked once · last asked Jun 7 · Concept · Junior
What factors determine which semantic HTML element you use for a particular part of a page?
Asked once · last asked Jun 7 · Concept · Junior
What is the HTML `<embed>` tag?
Asked once · last asked Jun 18 · Concept · Junior
What does the HTML script element do?
Asked once · last asked Nov 21 · Concept · Junior
What are semantic tags?
Asked once · last asked Nov 21 · Concept · Junior
How do you insert an image in HTML?
Asked once · last asked Jul 27 · Concept · Junior
Which attributes and other details are important when inserting an image in HTML?
Asked once · last asked Jul 27 · Concept · Junior
What is an element in HTML?
Asked once · last asked Jul 27 · Concept · Junior
What is the difference between a p tag and a div tag?
Asked once · last asked Aug 4 · Concept · Junior
What is XML?
Asked once · last asked Aug 13 · Concept · Junior
What are HTML tags?
Asked once · last asked Aug 13 · Concept · Junior
What is the difference between a website and a web application?
Asked once · last asked Aug 18 · Concept · Junior
What is a doctype?
Asked once · last asked Sep 2 · Concept · Junior
How would you build a static landing page that requires no server-side processing?
Asked once · last asked Oct 2 · Scenario · Mid-level
How would you build a website, and what tools would you use?
Asked once · last asked Oct 7 · Tooling · Mid-level
Which container element can you use to embed a Tableau visualization in a web page?
Asked once · last asked Oct 9 · Tooling · Mid-level
In pure HTML, what is the input type for uploading a file?
Asked once · last asked Oct 12 · Concept · Junior
In HTML, how would you allow users to upload multiple files?
Asked once · last asked Oct 12 · Tooling · Junior
What is a hyperlink in HTML?
Asked once · last asked Oct 19 · Concept · Junior
Can you clarify exactly what a hyperlink is and what it does in HTML, without jumping to examples?
Asked once · last asked Oct 19 · Concept · Junior
What role does the anchor element play in HTML?
Asked once · last asked Oct 19 · Concept · Junior
Other ways it was asked
- “What role does the anchor element actually play?”
What is the body tag section used for in HTML?
Asked once · last asked Oct 19 · Concept · Junior
Are page metadata and the document title part of the HTML <body> section, or where do they belong?
Asked once · last asked Oct 19 · Concept · Junior
More HTML and CSS interview questions
- All HTML and CSS interview questions
- CSS Layout and Responsive Design Interview Questions
- Browser Rendering and Web Performance Interview Questions
How this list is made
Every question here was asked by a real interviewer in a real job interview that a candidate ran MeetAssist in. After the call, the interviewer's questions are pulled from the transcript. Practice sessions, tests, exams and anything that was not a job interview are dropped.
Questions are rewritten so they make sense on their own: names of people, employers and clients are removed, and speech-to-text mistakes are fixed. Small talk, logistics and questions about one candidate's own résumé are left out. Rephrasings of the same question are merged, and the count is the number of different interviews it came up in.
The interviews come from candidates who use MeetAssist, so they lean towards software, data and AI roles: the shares describe these interviews, not every HTML and CSS interview. Answers to the most asked questions are written and checked by an editor; a "common mistake" is shown only when reviews of real answers in these interviews show it, with the count.
157 interviews, 125 candidates, Oct 2025 to Oct 2026. Updated every month with new interviews.
Or add the Chrome extension