LearnThatStack Ace your next interview
Frontend Development
HTML5.
84 Qs 13 free
Change topic Change
Drill · questions

All questions

of 84
Beginner 15
01

What is the difference between HTML and HTML5?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

HTML5 is the latest version of HTML with several key improvements:
- New semantic elements: <header>, <footer>, <article>, <section>, <nav>
- Multimedia support: Native <video> and <audio> elements without plugins
- Graphics: <canvas> for drawing and <svg> support
- Better forms: New input types like email, date, range, color
- APIs: Geolocation, Web Storage, Web Workers, Drag and Drop
- Removed deprecated tags: <font>, <center>, <big>

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

02

Explain the basic structure of an HTML document.

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

An HTML document has a standard structure:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Page Title</title>
</head>
<body>
    <!-- Content goes here -->
</body>
</html>

- <!DOCTYPE html>: Declares the document type and HTML version
- <html>: Root element containing all other elements
- <head>: Contains metadata, title, links to stylesheets
- <body>: Contains the visible page content

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

03

What are void elements in HTML?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Void elements (also called self-closing or empty elements) are HTML elements that cannot have any content or child elements. They don't have a closing tag. Common examples include:
- <br> - Line break
- <hr> - Horizontal rule
- <img> - Image
- <input> - Form input
- <meta> - Metadata
- <link> - External resource link

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

04

What is the difference between block-level and inline elements?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Block-level elements:
- Start on a new line
- Take up full width available
- Can contain other block and inline elements
- Examples: <div>, <p>, <h1>, <section>, <article>

Inline elements:
- Don't start on a new line
- Only take up necessary width
- Cannot contain block-level elements
- Examples: <span>, <a>, <strong>, <img>, <input>

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

05

Explain the difference between `<div>` and `<span>`.

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

<div> is a block-level container element used for grouping and structuring larger sections of content. It starts on a new line and takes full width. <span> is an inline container used for styling or grouping small portions of text or inline elements within a line. Neither has semantic meaning; they're purely for layout and styling purposes.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

06

How do you create a hyperlink that opens in a new tab?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Use the target="_blank" attribute. It's also recommended to add rel="noopener noreferrer" for security:

<a href="https://example.com" target="_blank" rel="noopener noreferrer">Link</a>

- noopener: Prevents the new page from accessing the window.opener property
- noreferrer: Prevents passing referrer information

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

07

What are the different list types in HTML?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

HTML provides three main list types:
- Ordered List (<ol>): Numbered list for sequential items
- Unordered List (<ul>): Bulleted list for non-sequential items
- Description List (<dl>): List of terms (<dt>) and descriptions (<dd>)

Each serves different semantic purposes for organizing content.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

08

How do you embed a video in HTML5?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Use the <video> element with various attributes:

<video controls width="320" height="240" poster="thumbnail.jpg">
  <source src="video.mp4" type="video/mp4">
  <source src="video.webm" type="video/webm">
  Your browser doesn't support video.
</video>

Key attributes: controls (playback controls), autoplay, loop, muted, poster (thumbnail).

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

09

What is the difference between GET and POST form methods?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

GET:
- Appends data to URL as query parameters
- Limited data size (~2048 characters)
- Data visible in URL
- Can be bookmarked
- Used for retrieving data

POST:
- Sends data in request body
- No size limitations
- Data not visible in URL
- Cannot be bookmarked
- Used for submitting/modifying data

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

10

What is the purpose of the `<fieldset>` and `<legend>` elements?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

<fieldset> groups related form controls and creates a visual box around them. <legend> provides a caption for the fieldset:

<fieldset>
  <legend>Personal Information</legend>
  <input type="text" name="name">
  <input type="email" name="email">
</fieldset>

They improve form organization, accessibility, and visual structure.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

11

How do you associate a label with a form control?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

Two methods:
1. Using for attribute matching the input's id:

<label for="username">Username:</label>
<input type="text" id="username">

2. Nesting input inside label:
<label>Username: <input type="text"></label>

Proper association improves accessibility and allows clicking the label to focus the input.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

12

When should you use `<header>` and `<footer>` elements?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

<header>: Introductory content or navigational aids. Can be used for:
- Page header with logo and main navigation
- Article or section headers with headings and metadata

<footer>: Closing content. Typically contains:
- Copyright information
- Contact details
- Sitemap links
- Related links

Both can appear multiple times per page (page-level and within articles/sections).

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

13

When should you use `<nav>` element?

Beginner ·

Answer it yourself first - out loud, or typed below.

How should your speech become text?

Listening… your words appear above as you speak - tap Stop when you're done.

Recording · cr - tap Stop & transcribe when you're done.

Transcribing with AI…

Voice:

Keep going - a few more words and AI can grade it.

Last attempt -

Your answer

Re-explain

<nav> represents a section with navigation links. Use for:
- Main site navigation
- Table of contents
- Breadcrumbs
- Pagination

Not every group of links needs <nav> - only major navigation blocks. Footer links might not need <nav> unless they're primary navigation.

Rewriting in plainer words…

This answer doesn't lend itself to a diagram - it reads best . No credits were charged.

The model's verdict: “

The interactive diagram is below the answer - jump to diagram ↓

This answer is explained by a shared concept diagram - open

Tailored explanation · switch back to · ·
Point the redraw:
How well did you know this?
AI:

14

How do you make images accessible?

Part of Pro
15

How do you indicate the language of content?

Part of Pro
Intermediate 41
16

What is the DOCTYPE declaration and why is it important?

Part of Pro
17

What are HTML entities and when should you use them?

Part of Pro
18

What is the difference between `<strong>` and `<b>` tags?

Part of Pro
19

What are data attributes in HTML?

Part of Pro
20

Explain the difference between `<script>`, `<script async>`, and `<script defer>`.

Part of Pro
21

What is the purpose of the `<picture>` element?

Part of Pro
22

Explain the Canvas API in HTML5.

Part of Pro
23

What is the Geolocation API?

Part of Pro
24

What is localStorage and sessionStorage?

Part of Pro
25

Explain the drag and drop API in HTML5.

Part of Pro
26

What is the purpose of the `contenteditable` attribute?

Part of Pro
27

What are the new input types introduced in HTML5?

Part of Pro
28

Explain form validation attributes in HTML5.

Part of Pro
29

What is the `autocomplete` attribute?

Part of Pro
30

Explain the `<datalist>` element.

Part of Pro
31

What is the purpose of the `formaction` attribute?

Part of Pro
32

What is semantic HTML and why is it important?

Part of Pro
33

Explain the purpose of `<article>` vs `<section>` elements.

Part of Pro
34

What is the purpose of the `<main>` element?

Part of Pro
35

What is the `<aside>` element used for?

Part of Pro
36

Explain the `<figure>` and `<figcaption>` elements.

Part of Pro
37

What is the `<time>` element?

Part of Pro
38

What are the supported video formats in HTML5?

Part of Pro
39

How do you make images responsive?

Part of Pro
40

What is the `loading` attribute for images?

Part of Pro
41

Explain SVG and its advantages.

Part of Pro
42

What is the `preload` attribute for media elements?

Part of Pro
43

How do you add subtitles to a video?

Part of Pro
44

What are Open Graph meta tags?

Part of Pro
45

Explain the viewport meta tag.

Part of Pro
46

What is the purpose of canonical URLs?

Part of Pro
47

What meta tags are important for SEO?

Part of Pro
48

What is the `robots` meta tag?

Part of Pro
49

What are ARIA attributes and when should you use them?

Part of Pro
50

What is the importance of heading hierarchy?

Part of Pro
51

What is keyboard navigation and why is it important?

Part of Pro
52

Explain the importance of semantic HTML for accessibility.

Part of Pro
53

What are skip links?

Part of Pro
54

How can you optimize HTML for performance?

Part of Pro
55

What is the importance of minification?

Part of Pro
56

What is above-the-fold content optimization?

Part of Pro
Expert 28
57

What are Web Workers in HTML5?

Part of Pro
58

What are Web Components?

Part of Pro
59

Explain structured data and schema markup.

Part of Pro
60

What is focus management in web applications?

Part of Pro
61

What is the Critical Rendering Path?

Part of Pro
62

What are resource hints in HTML?

Part of Pro
63

How do you handle browser caching with HTML?

Part of Pro
64

What are Web Components' lifecycle callbacks?

Part of Pro
65

Explain Content Security Policy (CSP).

Part of Pro
66

What is Shadow DOM?

Part of Pro
67

How do Service Workers relate to HTML?

Part of Pro
68

What is the Intersection Observer API?

Part of Pro
69

Explain Progressive Web App (PWA) manifest.

Part of Pro
70

What is CORS and how does it affect HTML?

Part of Pro
71

What are HTML Imports and why were they deprecated?

Part of Pro
72

Explain the `sandbox` attribute for iframes.

Part of Pro
73

What is the `integrity` attribute?

Part of Pro
74

How do you implement infinite scrolling with HTML attributes?

Part of Pro
75

What is the `is` attribute in custom elements?

Part of Pro
76

Explain the `slot` element in Web Components.

Part of Pro
77

What are portal elements (proposed)?

Part of Pro
78

How do you optimize HTML for Core Web Vitals?

Part of Pro
79

What is declarative Shadow DOM?

Part of Pro
80

Explain the `blocking` attribute for rendering.

Part of Pro
81

What are HTML modules (proposed)?

Part of Pro
82

How do you implement A/B testing with HTML?

Part of Pro
83

What is the Layer Model in CSS and how does HTML interact with it?

Part of Pro
84

Explain microfrontends and HTML's role.

Part of Pro

No matches

Try a different filter or search term.

Pro · $10/mo

71 of 84 HTML5 answers are gated.

Full answers, code samples, AI explanations - simpler, deeper, or as an interactive diagram. Cancel anytime.

  • Full answers + code
  • AI explain - simpler, deeper, or visualized
  • 1,000 AI credits / month
  • Cancel anytime

Change topic

Pick a different technology or stack. Your current topic stays put until you choose a new one.

Technologies
No technologies match “”.
Cross-cutting topics
No topics match “”.
By role
Stacks & frameworks

MEAN

MongoDB, Express, Angular, Node.js

MERN

MongoDB, Express, React, Node.js

LAMP

Linux, Apache, MySQL, PHP

Django

Python Full-Stack Development

Ruby on Rails

Convention over Configuration

JAM

JavaScript, APIs, and Markup

Serverless on AWS

Serverless Architecture on AWS

Cross-cutting topics 43 topics

Interviewers also test these - they're common to every stack, whichever one you picked above.

Flutter Mobile

Flutter Cross-Platform Mobile Development

Cross-cutting topics 44 topics

Interviewers also test these - they're common to every stack, whichever one you picked above.

Spring Boot

Enterprise Java Development

.NET

Microsoft Ecosystem

Vue

Vue.js, Vite, TypeScript, Tailwind, Node.js

Go Backend

Golang, gRPC, PostgreSQL, Redis, RabbitMQ

FastAPI

Python, FastAPI, SQLAlchemy, PostgreSQL

React Native

React, TypeScript, Redux, Firebase

iOS Native

Swift, SwiftUI, UIKit, Firebase

Android Native

Java, Jetpack Compose, Firebase

Web3 / Ethereum

Solidity, Ethereum, Hardhat, Foundry

DevOps / Platform

Docker, Kubernetes, Terraform, CI/CD

Core SWE Interview Prep

Data structures, algorithms, OS, concurrency, networking, git
Big-O & Complexity Analysis Arrays, Strings & Hash Tables Linked Lists, Stacks & Queues Trees, BSTs & Heaps Graphs Sorting, Searching & Recursion Operating Systems Concurrency & Multithreading Networking for Developers Git & Version Control API Design 45 Distributed Systems Fundamentals 34

Cross-cutting topics 43 topics

Interviewers also test these - they're common to every stack, whichever one you picked above.


Cross-cutting topics 45 topics

Interviewers also test these - they're common to every stack, whichever one you picked above.