HTML - MCQ Questions and Answers

Test your knowledge of HTML with these interactive multiple-choice questions.

« First 1 2 3 4 Last »
« Previous Page Next Page »

1. What does HTML stand for?

  • a) Hyper Text Markup Language
  • b) High Tech Modern Language
  • c) Hyperlinks and Text Markup Language
  • d) Home Tool Markup Language
Answer: A - HTML stands for Hyper Text Markup Language, the standard markup language for creating web pages.

2. Which HTML element is used to define the document's body?

  • a) <body>
  • b) <html>
  • c) <head>
  • d) <main>
Answer: A - The <body> element contains all the contents of an HTML document.

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

  • a) <link>
  • b) <a>
  • c) <href>
  • d) <hyperlink>
Answer: B - The <a> tag defines a hyperlink, which is used to link from one page to another.

4. What is the correct HTML element for the largest heading?

  • a) <heading>
  • b) <h6>
  • c) <h1>
  • d) <head>
Answer: C - <h1> defines the most important heading (largest), while <h6> defines the least important heading.

5. Which HTML element is used to define a paragraph?

  • a) <paragraph>
  • b) <para>
  • c) <p>
  • d) <pg>
Answer: C - The <p> tag defines a paragraph in HTML.

6. Which attribute is used to specify the URL in a hyperlink?

  • a) src
  • b) link
  • c) href
  • d) url
Answer: C - The href attribute specifies the URL of the page the link goes to.

7. Which HTML element is used to display an image?

  • a) <img>
  • b) <image>
  • c) <picture>
  • d) <src>
Answer: A - The <img> tag is used to embed an image in an HTML page.

8. Which attribute is used to specify the source file of an image?

  • a) href
  • b) link
  • c) src
  • d) file
Answer: C - The src attribute specifies the path to the image to be displayed.

9. Which HTML element is used to define a table row?

  • a) <tr>
  • b) <td>
  • c) <table>
  • d) <th>
Answer: A - The <tr> tag defines a row in an HTML table.

10. Which HTML element is used to define a table cell?

  • a) <tr>
  • b) <td>
  • c) <table>
  • d) <cell>
Answer: B - The <td> tag defines a standard data cell in an HTML table.

11. Which HTML element is used to create an unordered list?

  • a) <ol>
  • b) <ul>
  • c) <li>
  • d) <list>
Answer: B - The <ul> tag defines an unordered (bulleted) list.

12. Which HTML element is used to create an ordered list?

  • a) <ol>
  • b) <ul>
  • c) <li>
  • d) <list>
Answer: A - The <ol> tag defines an ordered (numbered) list.

13. Which HTML element is used to define list items?

  • a) <ol>
  • b) <ul>
  • c) <li>
  • d) <list>
Answer: C - The <li> tag defines a list item, used inside both <ol> and <ul> elements.

14. Which HTML element is used to define a line break?

  • a) <break>
  • b) <lb>
  • c) <br>
  • d) <newline>
Answer: C - The <br> tag inserts a single line break.

15. Which HTML element is used to define a horizontal rule?

  • a) <hr>
  • b) <line>
  • c) <hl>
  • d) <rule>
Answer: A - The <hr> tag defines a thematic break or horizontal rule in an HTML page.

16. Which HTML element is used to define emphasized text?

  • a) <strong>
  • b) <em>
  • c) <bold>
  • d) <italic>
Answer: B - The <em> tag is used to define emphasized text, typically displayed in italics.

17. Which HTML element is used to define important text?

  • a) <strong>
  • b) <em>
  • c) <bold>
  • d) <important>
Answer: A - The <strong> tag is used to define text with strong importance, typically displayed in bold.

18. Which HTML element is used to define a comment?

  • a) <!-- -->
  • b) <comment>
  • c) <cmt>
  • d) <note>
Answer: A - HTML comments are written between <!-- and --> tags.

19. Which HTML element is used to define a division or section?

  • a) <section>
  • b) <div>
  • c) <span>
  • d) <part>
Answer: B - The <div> tag defines a division or section in an HTML document.

20. Which HTML element is used to define an inline section?

  • a) <section>
  • b) <div>
  • c) <span>
  • d) <inline>
Answer: C - The <span> tag is an inline container used to mark up part of a text.
« First 1 2 3 4 Last »
« Previous Page Next Page »

Learn Computer Skills with PCBooks

Master computer skills with PCBooks! Explore interactive tutorials, MCQ tests, and online exams for programming, web development, and IT fundamentals. Perfect for beginners and advanced learners.

Online MCQ Tests for Programming

Practice programming MCQ questions and improve your coding skills with our online quizzes. Whether you're learning Python, Java, or C programming, PCBooks has you covered.

Free Web Development Tutorials

Learn HTML, CSS, and JavaScript with our free web development tutorials. Test your knowledge with interactive quizzes and online exams.