Learn HTML MCQs

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

Which element is used for creating a table in HTML?

1) <table>

2) <tbl>

3) <tab>

4) <grid>

Answer : <table>

What does the `placeholder` attribute do in an input field?

1) Shows a hint

2) Defines a label

3) Creates a default value

4) Inserts a tooltip

Answer : Shows a hint

How do you specify the language of an HTML document?

1) <html lang="en">

2) <html language="en">

3) <html lang="english">

4) <html language="english">

Answer : <html lang="en">

What is the use of the `style` attribute in HTML?

1) Applies inline CSS

2) Links to external styles

3) Defines a class

4) Creates a script

Answer : Applies inline CSS

How do you make an unordered list in HTML?

1) <ul>

2) <list>

3) <ol>

4) <item>

Answer : <ul>

Which tag is used for creating a form in HTML?

1) <form>

2) <input>

3) <fieldset>

4) <create>

Answer : <form>

What is the purpose of the `<head>` element?

1) Contains meta-information

2) Defines the body

3) Creates a footer

4) Links to scripts

Answer : Contains meta-information

What attribute specifies an image as a link?

1) href

2) src

3) link

4) alt

Answer : href

What does the `<h1>` tag define?

1) The main heading

2) A paragraph

3) A link

4) A section

Answer : The main heading

How do you create a radio button in HTML?

1) <input type="radio">

2) <radio>

3) <input radio="true">

4) <input type="button">

Answer : <input type="radio">