Html: 18 MCQs

All 18 multiple-choice questions from this kit, free and with no sign-up.

Warm-up · 13 questions

Q1. Which HTML element is used to define the root of an HTML document?

Beginner
A <document>
B <body>
C <html>
D <head>

Answers and explanations are in the Veda app.

Q2. What is the purpose of the <head> element in an HTML document?

Beginner
A To define a navigation menu
B To contain metadata and links to resources
C To display the main content of the page
D To create a footer section

Answers and explanations are in the Veda app.

Q3. Which attribute is used to specify a unique identifier for an HTML element?

Beginner
A class
B name
C id
D style

Answers and explanations are in the Veda app.

Q4. What does the <a> element require to create a hyperlink?

Beginner
A src attribute
B href attribute
C link attribute
D url attribute

Answers and explanations are in the Veda app.

Q5. Which HTML element is used to insert a line break?

Beginner
A <br>
B <newline>
C <lb>
D <break>

Answers and explanations are in the Veda app.

Q6. What is the correct way to comment in HTML?

Beginner
A /* comment */
B # comment
C // comment
D <!-- comment -->

Answers and explanations are in the Veda app.

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

Beginner
A <th>
B <td>
C <table>
D <tr>

Answers and explanations are in the Veda app.

Q8. Which element is used to define a list item in an unordered list?

Beginner
A <item>
B <ol>
C <ul>
D <li>

Answers and explanations are in the Veda app.

Q9. What is the purpose of the 'src' attribute in the <img> element?

Beginner
A To add a border
B To set the image width
C To provide alternative text
D To specify the image source URL

Answers and explanations are in the Veda app.

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

Beginner
A <p>
B <para>
C <paragraph>
D <text>

Answers and explanations are in the Veda app.

Q11. Which element is used to define a heading of the highest level?

Beginner
A <h6>
B <h1>
C <heading>
D <head>

Answers and explanations are in the Veda app.

Q12. The <title> element is placed inside the <body> element.

Beginner
A True
B False

Answers and explanations are in the Veda app.

Q13. HTML attributes provide additional information about elements and are always specified in the opening tag.

Beginner
A True
B False

Answers and explanations are in the Veda app.

Building up · 5 questions

Q14. Which attribute is used to provide alternative text for an image in the <img> element?

Intermediate
A title
B desc
C alt
D caption

Answers and explanations are in the Veda app.

Q15. What is the difference between <div> and <span> elements?

Intermediate
A <div> is block-level, <span> is inline
B Both are block-level
C <div> is inline, <span> is block-level
D Both are inline

Answers and explanations are in the Veda app.

Q16. What does the 'target' attribute do in an <a> element?

Intermediate
A Specifies where to open the linked document
B Adds a tooltip
C Specifies the URL
D Sets the link color

Answers and explanations are in the Veda app.

Q17. What does the 'class' attribute do in HTML?

Intermediate
A Assigns one or more class names for styling
B Assigns a unique identifier
C Defines a hyperlink
D Sets the element's display type

Answers and explanations are in the Veda app.

Q18. The <br> element is a void element and does not require a closing tag.

Intermediate
A True
B False

Answers and explanations are in the Veda app.

Make your own

Your notes can be a kit like these

Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free to start, in more than 40 languages.

  • Chapter notes
  • Flashcards
  • Practice MCQs
  • Scored tests
  • Paper Solver

Get Veda free See what students get

Free to start · Android app and web · More than 40 languages