Learn HTML MCQs

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

Which element is used to create a dropdown list?

1) <list>

2) <select>

3) <dropdown>

4) <option>

Answer : <select>

What does the `<strong>` tag do?

1) Defines important text

2) Makes text bold

3) Creates a heading

4) Underlines text

Answer : Defines important text

Which attribute is used to specify the size of an input field?

1) size

2) length

3) width

4) height

Answer : size

What is the correct HTML for creating an image?

1) <img src="image.jpg" alt="My Image">

2) <image src="image.jpg">

3) <img src="image.jpg">

4) <img alt="My Image">

Answer : <img src="image.jpg" alt="My Image">

Which HTML element is used to define navigation links?

1) <nav>

2) <navigate>

3) <links>

4) <menu>

Answer : <nav>

What is the purpose of the `target` attribute in a link?

1) To open the link in a new window/tab

2) To specify link text

3) To define link color

4) To create a link

Answer : To open the link in a new window/tab

Which tag is used to define a section in an HTML document?

1) <section>

2) <div>

3) <part>

4) <segment>

Answer : <section>

What does the `defer` attribute do in a `<script>` tag?

1) Defers loading until the page is loaded

2) Executes script immediately

3) Blocks the script

4) Specifies a fallback script

Answer : Defers loading until the page is loaded

Which attribute is used to specify the height of an image?

1) height

2) size

3) width

4) scale

Answer : height

Which tag is used to create a footer in HTML?

1) <footer>

2) <bottom>

3) <end>

4) <section>

Answer : <footer>