Learn HTML MCQs

Prepare HTML MCQs (Multiple choice Questions) for exam and job interviews.

How do you specify a table row in HTML?

1) <tr>

2) <row>

3) <table-row>

4) <td>

Answer : <tr>

What is the purpose of the `<meta>` tag?

1) Provides metadata

2) Links to styles

3) Defines a title

4) Inserts a script

Answer : Provides metadata

Which attribute is used to open a link in a new tab?

1) target="_blank"

2) newtab="true"

3) href="new"

4) link="new"

Answer : target="_blank"

How do you define a caption for a table?

1) <caption>

2) <title>

3) <header>

4) <legend>

Answer : <caption>

What does the `<blockquote>` tag do?

1) Defines a section for quotes

2) Styles text

3) Creates a link

4) Inserts an image

Answer : Defines a section for quotes

Which tag is used to define a navigation bar in HTML?

1) <nav>

2) <navigation>

3) <menu>

4) <link>

Answer : <nav>

What is the purpose of the `<title>` tag?

1) Defines the title of the document

2) Creates a heading

3) Links to CSS

4) Defines a section

Answer : Defines the title of the document

Which attribute is used to specify the character encoding for a document?

1) charset

2) encoding

3) type

4) meta

Answer : charset

What is the correct HTML for creating a checkbox?

1) <input type="checkbox">

2) <checkbox>

3) <input check="true">

4) <input type="check">

Answer : <input type="checkbox">

How do you insert a comment in HTML?

1) <!-- Comment -->

2) // Comment

3) /* Comment */

4) <comment>

Answer : <!-- Comment -->