Learn HTML MCQs

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

What is the correct HTML tag for creating a form?

1) <form>

2) <input>

3) <field>

4) <formdata>

Answer : <form>

Which HTML element is used for text input fields?

1) <text>

2) <input>

3) <textarea>

4) <field>

Answer : <input>

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

1) Specifies where to open the linked document

2) Defines the title of the link

3) Links to another document

4) Specifies the type of link

Answer : Specifies where to open the linked document

Which HTML element is used to embed a YouTube video?

1) <embed>

2) <iframe>

3) <video>

4) <source>

Answer : <iframe>

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

1) To define relationships between documents

2) To include CSS stylesheets

3) To link JavaScript files

4) To define the character set

Answer : To include CSS stylesheets

Which tag is used to create an HTML form?

1) <form>

2) <input>

3) <fieldset>

4) <action>

Answer : <form>

How do you create a radio button in HTML?

1) <input type="radio">

2) <radio>

3) <input type="checkbox">

4) <input type="button">

Answer : <input type="radio">

Which HTML tag is used to define a text area for multi-line input?

1) <textarea>

2) <input>

3) <text>

4) <multiline>

Answer : <textarea>

Which HTML attribute is used to specify the maximum number of characters allowed in an input field?

1) maxlength

2) size

3) length

4) limit

Answer : maxlength

How can you create a hidden input field in HTML?

1) <input type="hidden">

2) <input hidden>

3) <input type="invisible">

4) <input type="secret">

Answer : <input type="hidden">