Learn HTML MCQs

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

How do you add comments in HTML?

1) <!-- Comment -->

2) // Comment

3) /* Comment */

4) <comment>

Answer : <!-- Comment -->

What is the default font size in HTML?

1) 16px

2) 12px

3) 14px

4) 10px

Answer : 16px

Which tag is used for creating an ordered list?

1) <ol>

2) <ul>

3) <list>

4) <order>

Answer : <ol>

What does the `<div>` tag do?

1) Defines a division

2) Creates a paragraph

3) Inserts an image

4) Links to a section

Answer : Defines a division

Which tag is used to define an unordered list?

1) <ul>

2) <ol>

3) <list>

4) <item>

Answer : <ul>

How do you create a text input field in HTML?

1) <input type="text">

2) <textfield>

3) <input field="text">

4) <text>

Answer : <input type="text">

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

1) Link to external resources

2) Create a hyperlink

3) Link to stylesheets

4) Insert images

Answer : Link to external resources

Which attribute is used to specify the target for a link?

1) href

2) target

3) link

4) url

Answer : target

What is the correct way to specify a font in CSS?

1) font-family: Arial;

2) font: Arial;

3) font-family: "Arial";

4) font: "Arial";

Answer : font-family: Arial;

How do you create a checkbox in HTML?

1) <input type="checkbox">

2) <checkbox>

3) <input check="true">

4) <input type="check">

Answer : <input type="checkbox">