Learn HTML MCQs

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

How do you specify an input field for passwords in HTML?

1) <input type="password">

2) <input type="text">

3) <input type="pass">

4) <input password="true">

Answer : <input type="password">

Which tag is used to create a line break in HTML?

1) <br>

2) <break>

3) <lb>

4) <newline>

Answer : <br>

Which HTML tag is used to create a numbered list?

1) <ol>

2) <ul>

3) <li>

4) <dl>

Answer : <ol>

Which tag is used to embed multimedia content in HTML?

1) <embed>

2) <video>

3) <audio>

4) <object>

Answer : <embed>

What is the correct way to write a comment in HTML?

1) <!-- comment -->

2) // comment

3) /* comment */

4) <! comment !>

Answer : <!-- comment -->

Which HTML element is used to create a checkbox?

1) <input type="checkbox">

2) <input type="check">

3) <checkbox>

4) <check>

Answer : <input type="checkbox">

Which HTML tag defines a table cell?

1) <td>

2) <th>

3) <table>

4) <tr>

Answer : <td>

Which attribute in HTML specifies the relationship between a linked document and the current document?

1) rel

2) src

3) href

4) link

Answer : rel

What is the purpose of the `<nav>` tag in HTML?

1) Defines navigation links

2) Defines a form

3) Defines a section

4) Defines a footer

Answer : Defines navigation links

What is the correct syntax for including an external JavaScript file in HTML?

1) <script src="script.js">

2) <javascript src="script.js">

3) <js src="script.js">

4) <script href="script.js">

Answer : <script src="script.js">