Learn HTML MCQs

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

Which HTML element is used to group related options in a dropdown list?

1) <optgroup>

2) <select>

3) <option>

4) <dropdown>

Answer : <optgroup>

What is the correct HTML element for specifying a header for a document or section?

1) <header>

2) <h1>

3) <head>

4) <section>

Answer : <header>

Which HTML element is used to create a numbered list?

1) <ol>

2) <ul>

3) <li>

4) <list>

Answer : <ol>

Which HTML tag is used to embed an object in a webpage?

1) <embed>

2) <object>

3) <media>

4) <iframe>

Answer : <embed>

How can you make a text italic in HTML?

1) <i>

2) <italic>

3) <em>

4) <strong>

Answer : <i>

Which HTML attribute is used to specify the character encoding for a web page?

1) charset

2) encoding

3) lang

4) code

Answer : charset

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

1) To provide metadata about the HTML document

2) To include scripts

3) To link stylesheets

4) To define the viewport

Answer : To provide metadata about the HTML document

Which HTML attribute is used to define the relationship between the current document and an external resource?

1) src

2) href

3) link

4) rel

Answer : rel

What is the correct HTML element for the largest heading?

1) <h1>

2) <heading>

3) <h6>

4) <head>

Answer : <h1>

Which tag is used to create an image map in HTML?

1) <imgmap>

2) <map>

3) <img>

4) <maparea>

Answer : <map>