HTML Basics Quiz

Test your knowledge of HTML fundamentals

15:00
15 min quiz
Question 1 of 1010% complete
What does HTML stand for?
1 points

About this HTML quiz

This beginner-level quiz has 10 questions covering basics, introduction, elements. You have 15 minutes, and you need 70% to pass. Every question comes with an explanation, so a wrong answer still teaches you something. Questions mix multiple choice, multiple answer and true/false formats.

Revise before you start

Answers and explanations

Show all 10 answers (spoilers)
  1. What does HTML stand for?

    Answer: Hyper Text Markup Language

    HTML stands for HyperText Markup Language, which is the standard markup language for creating web pages.

  2. Which HTML tag is used to create a heading?

    Answer: <h1>

    The <h1> tag is used to create headings in HTML. There are six levels of headings from <h1> to <h6>.

  3. Which of the following are valid HTML5 semantic elements?

    Answer: <header>, <nav>, <section>, <article>, <footer>

    All of these except <div> are HTML5 semantic elements. <div> is a generic container without semantic meaning.

  4. HTML tags are case-sensitive.

    Answer: False

    HTML tags are not case-sensitive, but it's best practice to use lowercase for consistency.

  5. What is the correct HTML for creating a link?

    Answer: <a href="http://example.com">Link</a>

    The <a> tag with the href attribute is used to create links in HTML.

  6. Complete the HTML structure: <!DOCTYPE html><html><___><title>Page Title</title></___><body></body></html>

    Answer: head

    The <head> element contains metadata about the document and is not displayed on the page.

  7. Which attribute specifies the destination of a link?

    Answer: href

    The href attribute specifies the URL of the page the link goes to.

  8. What does the following code create? <img src="image.jpg" alt="A beautiful sunset">

    <img src="image.jpg" alt="A beautiful sunset">

    Answer: An image with alt text

    The <img> tag creates an image element, and the alt attribute provides alternative text for accessibility.

  9. Which of the following are self-closing HTML tags?

    Answer: <br>, <img>, <input>, <hr>

    Self-closing tags don't need a closing tag. Common examples include <br>, <img>, <input>, and <hr>.

  10. What is the purpose of the DOCTYPE declaration?

    Answer: To specify the HTML version

    The DOCTYPE declaration tells the browser which version of HTML the page is written in.

Want more practice? Browse all web development quizzes or try the code yourself in the live playground.