All featured quizzes

HTML - Basics

HTML elements, blockquotes, horizontal rules, line breaks, image embedding, and table attributes.

Sample Questions

A preview of what's in this quiz. Answer them interactively for instant scoring and full explanations.

What does HTML stand for?

1. What does HTML stand for?

  • A.HighText Machine Language
  • B.HyperText Markdown Language
  • C.HyperText Markup Language
  • D.Hyperlink and Text Markup Language
Which declaration must be at the very top of an HTML5 document to tell the browser the document type?

2. Which declaration must be at the very top of an HTML5 document to tell the browser the document type?

  • A.<html>
  • B.<meta charset="UTF-8">
  • C.<!DOCTYPE html>
  • D.<doctype html5>
Which HTML element is used to insert a line break (forcing text to start on a new line) without starting a new paragraph?

3. Which HTML element is used to insert a line break (forcing text to start on a new line) without starting a new paragraph?

  • A.<lb>
  • B.<break>
  • C.<br>
  • D.<hr>
Which HTML tag is used to define the most important heading on a page?

4. Which HTML tag is used to define the most important heading on a page?

  • A.<h6>
  • B.<heading>
  • C.<h1>
  • D.<head>
Which element defines the title of the document that is shown in the browser's title bar or tab?

5. Which element defines the title of the document that is shown in the browser's title bar or tab?

  • A.<meta name="title">
  • B.<head>
  • C.<title>
  • D.<h1>
Which HTML tag is used to create a horizontal rule or divider line on a page?

6. Which HTML tag is used to create a horizontal rule or divider line on a page?

  • A.<line>
  • B.<br>
  • C.<hr>
  • D.<divider>
Which attribute value of the `<a>` tag is used to open a linked document in a new browser window or tab?

7. Which attribute value of the `<a>` tag is used to open a linked document in a new browser window or tab?

  • A.target="_new"
  • B.rel="external"
  • C.target="_blank"
  • D.type="new-tab"
Which attribute is used to provide alternative text for an image if it cannot be displayed, improving accessibility (a11y)?

8. Which attribute is used to provide alternative text for an image if it cannot be displayed, improving accessibility (a11y)?

  • A.title
  • B.description
  • C.alt
  • D.src-alt
What is the root element of an HTML page that encloses all other elements?

9. What is the root element of an HTML page that encloses all other elements?

  • A.<body>
  • B.<head>
  • C.<html>
  • D.<main>
Which HTML element is used to embed an image in a web page?

10. Which HTML element is used to embed an image in a web page?

  • A.<image>
  • B.<picture>
  • C.<img>
  • D.<src>
Which HTML element is used to define a paragraph of text?

11. Which HTML element is used to define a paragraph of text?

  • A.<paragraph>
  • B.<div>
  • C.<p>
  • D.<text>
Which tag is used to create a hyperlink in HTML?

12. Which tag is used to create a hyperlink in HTML?

  • A.<link>
  • B.<href>
  • C.<a>
  • D.<url>
Which element contains all the visible content of an HTML document, such as text, images, and links?

13. Which element contains all the visible content of an HTML document, such as text, images, and links?

  • A.<html>
  • B.<main>
  • C.<body>
  • D.<section>
Which attribute of the `<a>` tag specifies the URL or destination address of the link?

14. Which attribute of the `<a>` tag specifies the URL or destination address of the link?

  • A.src
  • B.url
  • C.href
  • D.link
Which attribute specifies the path or URL to the image file in an `<img>` tag?

15. Which attribute specifies the path or URL to the image file in an `<img>` tag?

  • A.href
  • B.alt
  • C.src
  • D.url
Which element contains metadata about the HTML document (such as title, charset, stylesheets, and scripts) and is not visible to users?

16. Which element contains metadata about the HTML document (such as title, charset, stylesheets, and scripts) and is not visible to users?

  • A.<body>
  • B.<html>
  • C.<head>
  • D.<header>
Which element is used to define a container for input fields and buttons that can be submitted to a server?

17. Which element is used to define a container for input fields and buttons that can be submitted to a server?

  • A.<input-group>
  • B.<fields>
  • C.<form>
  • D.<action>
Which attribute of the `<form>` tag specifies the HTTP method (GET or POST) to use when submitting the form?

18. Which attribute of the `<form>` tag specifies the HTTP method (GET or POST) to use when submitting the form?

  • A.action
  • B.type
  • C.method
  • D.enc-type
Which tag creates a generic input field whose behavior changes based on its `type` attribute?

19. Which tag creates a generic input field whose behavior changes based on its `type` attribute?

  • A.<field>
  • B.<textbox>
  • C.<input>
  • D.<button>
Which HTML element is used to represent an individual item inside an ordered or unordered list?

20. Which HTML element is used to represent an individual item inside an ordered or unordered list?

  • A.<item>
  • B.<ul>
  • C.<li>
  • D.<list-item>

Looking for a different topic? Browse all subjects