0% found this document useful (0 votes)
2 views69 pages

HTML Questions and Answers

The document consists of a series of questions and answers related to HTML, covering fundamental concepts such as tags, attributes, and their purposes. It includes questions about creating hyperlinks, paragraphs, headings, lists, tables, and other elements in HTML. The content serves as a basic guide for understanding HTML syntax and structure.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views69 pages

HTML Questions and Answers

The document consists of a series of questions and answers related to HTML, covering fundamental concepts such as tags, attributes, and their purposes. It includes questions about creating hyperlinks, paragraphs, headings, lists, tables, and other elements in HTML. The content serves as a basic guide for understanding HTML syntax and structure.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 69

1

HTML5 Questions and Answers

What does HTML stand for?


What is the purpose of HTML?
Which tag is used to create a hyperlink in HTML?
Which HTML tag is used to create a paragraph?
Which HTML tag is used to create a heading?
Which HTML attribute is used to specify alternative text for an image?
Which HTML tag is used to create a table?
Which HTML tag is used to create a list with bullets?
Which HTML tag is used to define a section of a web page?
Which of the following tags is used to define a paragraph?
What is the correct HTML syntax for creating a hyperlink?
Which of the following tags is used to create a table in HTML?
Which of the following tags is used to create a list in HTML?
Which of the following tags is used to add an image to an HTML page?
Which of the following tags is used to create a heading in HTML?
What is the correct HTML syntax for creating a line break?
Which of the following tags is used to define a form in HTML?
Which of the following tags is used to define a text input field in HTML?

Laurence Svekis https://basescripts.com/


2

What is the purpose of the <head> tag in HTML?


Which HTML tag is used to create a hyperlink?
What is the purpose of the <img> tag in HTML?
Which HTML tag is used to create a numbered list?
What is the purpose of the <div> tag in HTML?
Which HTML tag is used to create a table?
What is the purpose of the <form> tag in HTML?
What is the purpose of the <meta> tag in HTML?
Which HTML tag is used to create an unordered list?
What is the purpose of the alt attribute in the <img> tag?
Which HTML tag is used to create a line break?
What is the purpose of the <header> tag in HTML?
Which HTML tag is used to create a hyperlink to an email address?
What is the purpose of the <style> tag in HTML?
Which HTML tag is used to create a dropdown menu?
Which HTML tag is used to create a table?
What is the purpose of the <form> tag in HTML?
Which HTML tag is used to create a horizontal rule?
What is the purpose of the <footer> tag in HTML?
Which HTML tag is used to create an ordered list?
What is the purpose of the <head> tag in HTML?
Which HTML tag is used to create a checkbox?
What is the purpose of the <form> tag in HTML?
Which HTML tag is used to create a table?
What is the purpose of the target attribute in the <a> tag?
Which HTML tag is used to create a heading?
What is the purpose of the <textarea> tag in HTML?
Which HTML tag is used to create a horizontal line?
What is the purpose of the <video> tag in HTML?
Which HTML tag is used to create a button?
What is the purpose of the <form> tag in HTML?
Which HTML tag is used to create a hyperlink to another webpage?
What is the purpose of the <article> tag in HTML?
Which HTML tag is used to create a table?
What is the purpose of the <audio> tag in HTML?
Which HTML tag is used to define a section of the page that contains
navigation links?

Laurence Svekis https://basescripts.com/


3

What is the purpose of the <video> tag in HTML?


Which HTML tag is used to define a section of the page that contains contact
information?
What is the purpose of the <img> tag in HTML?
Which HTML tag is used to create a list of items with bullets?
What is the purpose of the <label> tag in HTML?
Which HTML tag is used to create a dropdown list?
What is the purpose of the <iframe> tag in HTML?
Which HTML tag is used to create a header for a section of a web page?
What is the purpose of the <blockquote> tag in HTML?
Which HTML tag is used to create a horizontal line on a web page?
Which HTML element is used to define a paragraph?
Which HTML element is used to define a header for a section or article?
Which HTML element is used to define a footer for a section or article?
Which HTML element is used to create a dropdown list?
Which HTML element is used to create a text input field?
Which HTML element is used to create a checkbox?
Which HTML element is used to create a radio button?
Which HTML element is used to create a button?
Which HTML element is used to create an image map?
Which HTML element is used to create a video player?
Which HTML element is used to define a paragraph?
Which HTML element is used to create a hyperlink to an email address?
Which HTML attribute is used to specify an alternative text description for an
image?
Which HTML element is used to create a paragraph?
Which HTML element is used to create a button?
Which HTML element is used to create a horizontal rule?
Which HTML attribute is used to specify the width of an image?
Which HTML element is used to create a dropdown list?
Which HTML attribute is used to specify the background color of an element?
Which HTML element is used to create a definition list?
Which HTML attribute is used to specify the alignment of an image?
What is the correct HTML element for adding a line of text?
Which HTML element is used to define a paragraph of text?
What is the correct HTML element for adding a horizontal rule?
Which HTML element is used to add a video to a web page?

Laurence Svekis https://basescripts.com/


4

What is the correct HTML element for adding a hyperlink to an email


address?
Which HTML element is used to define a header for a web page or section?
Which HTML element is used to add a comment to a web page?
Which HTML element is used to define a footer for a web page or section?
Which HTML element is used to add a background image to a web page?
Which HTML element is used to add a tooltip to an element?
Which HTML element is used to create a heading with smaller font size than
<h1>?
Which HTML attribute is used to specify the alternate text for an image?
Which HTML element is used to define a paragraph?
Which HTML element is used to create a horizontal line?
Which HTML attribute is used to specify the background color of an element?
Which HTML element is used to create a hyperlink to an email address?
Which HTML element is used to define a definition list?
Which HTML attribute is used to specify the width of an element?
Which HTML element is used to create a dropdown list?
Which HTML attribute is used to specify the target window for a link?
Which HTML element is used to define a paragraph?
Which HTML attribute is used to specify the alternate text for an image?
Which HTML element is used to create a hyperlink to an email address?
Which HTML element is used to create a horizontal line?
Which HTML element is used to create a definition list?
Which HTML element is used to create a dropdown list?
Which HTML element is used to create a checkbox?
Which HTML element is used to create a radio button?
Which HTML element is used to create a video player?
Which HTML element is used to create a header section?

What does HTML stand for?


A. Hyperlinks and Text Markup Language
B. Hyper Text Markup Language
C. Home Tool Markup Language

Laurence Svekis https://basescripts.com/


5

D. High Technology Markup Language

Answer: B. Hyper Text Markup Language. Explanation: HTML


stands for Hyper Text Markup Language, which is a markup
language used for creating web pages and web applications.

What is the purpose of HTML?


A. To create web pages and web applications
B. To design graphics and animations
C. To create database-driven websites
D. To write programming code

Answer: A. To create web pages and web applications.


Explanation: HTML is a markup language used for creating web
pages and web applications. It provides a structure and content
for web pages that can be displayed in web browsers.

Which tag is used to create a hyperlink in


HTML?
A. <a>
B. <link>
C. <img>

Laurence Svekis https://basescripts.com/


6

D. <head>

Answer: A. <a>. Explanation: The <a> tag is used to create a


hyperlink in HTML. The href attribute is used to specify the URL of
the page that the link should point to.

Which HTML tag is used to create a


paragraph?
A. <p>
B. <br>
C. <hr>
D. <div>

Answer: A. <p>. Explanation: The <p> tag is used to create a


paragraph in HTML. It is a block-level element that starts a new
line and adds space before and after the content.

Which HTML tag is used to create a heading?


A. <h1> to <h6>
B. <head>
C. <header>
D. <section>

Laurence Svekis https://basescripts.com/


7

Answer: A. <h1> to <h6>. Explanation: The <h1> to <h6> tags


are used to create headings in HTML. The <h1> tag is used for
the main heading, while the <h2> to <h6> tags are used for
subheadings.

Which HTML attribute is used to specify


alternative text for an image?
A. alt
B. src
C. title
D. href

Answer: A. alt. Explanation: The alt attribute is used to specify


alternative text for an image in HTML. This text is displayed if the
image cannot be loaded or if the user is using a screen reader.

Which HTML tag is used to create a table?


A. <table>
B. <tr>
C. <td>
D. <th>

Laurence Svekis https://basescripts.com/


8

Answer: A. <table>. Explanation: The <table> tag is used to


create a table in HTML. The <tr> tag is used to create a table
row, while the <td> and <th> tags are used to create table cells.

Which HTML tag is used to create a list with


bullets?
A. <ul>
B. <ol>
C. <li>
D. <dl>

Answer: A. <ul>. Explanation: The <ul> tag is used to create an


unordered list in HTML, which is a list with bullets. The <ol> tag
is used to create an ordered list with numbers, while the <li> tag
is used to create list items.

Which HTML tag is used to define a section of


a web page?
A. <div>
B. <article>

Laurence Svekis https://basescripts.com/


9

C. <section>
D. <aside>

Answer: C. <section>. Explanation: The <section> tag is used to


define a section of a web page in HTML. It is used to group
related content together and provide a semantic structure to the
page.

Which of the following tags is used to define a


paragraph?
a. <p>
b. <h1>
c. <a>
d. <img>

Answer: a. <p>
Explanation: The <p> tag is used to define a paragraph in HTML.

What is the correct HTML syntax for creating


a hyperlink?
a. <a href="http://www.example.com">Example</a>

Laurence Svekis https://basescripts.com/


10

b. <a link="http://www.example.com">Example</a>
c. <a url="http://www.example.com">Example</a>
d. <a src="http://www.example.com">Example</a>

Answer: a. <a href="http://www.example.com">Example</a>


Explanation: The <a> tag is used to create a hyperlink in HTML,
and the "href" attribute is used to specify the URL of the link.

Which of the following tags is used to create a


table in HTML?
a. <table>
b. <form>
c. <div>
d. <header>

Answer: a. <table>
Explanation: The <table> tag is used to create a table in HTML.

Which of the following tags is used to create a


list in HTML?
a. <p>

Laurence Svekis https://basescripts.com/


11

b. <div>
c. <ul>
d. <h1>

Answer: c. <ul>
Explanation: The <ul> tag is used to create an unordered list in
HTML.

Which of the following tags is used to add an


image to an HTML page?
a. <img>
b. <a>
c. <h1>
d. <table>

Answer: a. <img>
Explanation: The <img> tag is used to add an image to an HTML
page.

Laurence Svekis https://basescripts.com/


12

Which of the following tags is used to create a


heading in HTML?
a. <p>
b. <h1>
c. <img>
d. <ul>

Answer: b. <h1>
Explanation: The <h1> tag is used to create a top-level heading
in HTML.

What is the correct HTML syntax for creating


a line break?
a. <br>
b. <lb>
c. <break>
d. <line>

Answer: a. <br>
Explanation: The <br> tag is used to create a line break in HTML.

Laurence Svekis https://basescripts.com/


13

Which of the following tags is used to define a


form in HTML?
a. <p>
b. <form>
c. <h1>
d. <ul>

Answer: b. <form>
Explanation: The <form> tag is used to define a form in HTML.

Which of the following tags is used to define a


text input field in HTML?
a. <input>
b. <text>
c. <textfield>
d. <textbox>

Answer: a. <input>
Explanation: The <input> tag is used to define a text input field
in HTML.

Laurence Svekis https://basescripts.com/


14

What is the purpose of the <head> tag in


HTML?
A) To define the content that is displayed on the page
B) To define the main heading of the page
C) To define the title and other metadata of the page
D) To define the footer of the page

Answer: C) To define the title and other metadata of the page


Explanation: The <head> tag is used to define the title and other
metadata of an HTML document, such as keywords, descriptions,
and authorship information. This information is not displayed on
the page itself but is important for search engines and other web
applications.

Which HTML tag is used to create a hyperlink?


A) <link>
B) <a>
C) <img>
D) <h1>

Answer: B) <a>

Laurence Svekis https://basescripts.com/


15

Explanation: The <a> tag is used to create a hyperlink in HTML.


The href attribute is used to specify the URL of the page or
resource that the link points to.

What is the purpose of the <img> tag in


HTML?
A) To create a hyperlink
B) To display an image on the page
C) To define a table in HTML
D) To add a video to the page

Answer: B) To display an image on the page


Explanation: The <img> tag is used to display images on a web
page. The src attribute is used to specify the URL of the image
file.

Which HTML tag is used to create a numbered


list?
A) <ul>
B) <ol>
C) <li>

Laurence Svekis https://basescripts.com/


16

D) <dl>

Answer: B) <ol>
Explanation: The <ol> tag is used to create a numbered list in
HTML. The <li> tag is used to define each item in the list.

What is the purpose of the <div> tag in


HTML?
A) To create a hyperlink
B) To display an image on the page
C) To define a section of the page
D) To add a video to the page

Answer: C) To define a section of the page


Explanation: The <div> tag is used to define a section or division
of an HTML document. It is often used to group together related
elements or to apply CSS styles to a specific area of the page.

Which HTML tag is used to create a table?


A) <table>
B) <tr>
C) <td>

Laurence Svekis https://basescripts.com/


17

D) <th>

Answer: A) <table>
Explanation: The <table> tag is used to create a table in HTML.
The <tr> tag is used to define each row in the table, and the
<td> and <th> tags are used to define the cells within each row.

What is the purpose of the <form> tag in


HTML?
A) To create a link to an external page
B) To create a table on the page
C) To create a form for user input
D) To create a list of options for user selection

Answer: C) To create a form for user input


Explanation: The <form> tag is used to create a form on an
HTML page for user input, such as a search box or a contact form.
The action attribute is used to specify the URL of the page that
will process the form data.

Laurence Svekis https://basescripts.com/


18

What is the purpose of the <meta> tag in


HTML?
A) To define the main heading of the page
B) To define the content that is displayed on the page
C) To define the title and other metadata of the page
D) To define the footer of the page

Answer: C) To define the title and other metadata of the page


Explanation: The <meta> tag is used to define metadata, such as
keywords and descriptions, about an HTML document. It is also
used to define character encoding, viewport settings, and other
information that is not displayed on the page.

Which HTML tag is used to create an


unordered list?
A) <ul>
B) <ol>
C) <li>
D) <dl>

Answer: A) <ul>

Laurence Svekis https://basescripts.com/


19

Explanation: The <ul> tag is used to create an unordered list in


HTML. The <li> tag is used to define each item in the list.

What is the purpose of the alt attribute in the


<img> tag?
A) To specify the URL of the image file
B) To add a caption to the image
C) To define the size of the image
D) To provide alternative text for users who cannot see the image

Answer: D) To provide alternative text for users who cannot see


the image
Explanation: The alt attribute is used to provide alternative text
for an image in case it cannot be displayed. This is important for
users who are visually impaired or who have slow internet
connections.

Which HTML tag is used to create a line


break?
A) <br>
B) <p>

Laurence Svekis https://basescripts.com/


20

C) <hr>
D) <em>

Answer: A) <br>
Explanation: The <br> tag is used to create a line break in HTML.
It is often used to separate paragraphs or to create space
between different elements on a page.

What is the purpose of the <header> tag in


HTML?
A) To define the main heading of the page
B) To define the footer of the page
C) To define the content that is displayed on the page
D) To define the introductory content at the top of a page

Answer: D) To define the introductory content at the top of a


page
Explanation: The <header> tag is used to define the introductory
content at the top of a web page, such as a logo, navigation
menu, or a heading.

Laurence Svekis https://basescripts.com/


21

Which HTML tag is used to create a hyperlink


to an email address?
A) <a>
B) <email>
C) <mail>
D) <link>

Answer: A) <a>
Explanation: The <a> tag is used to create a hyperlink in HTML,
including links to email addresses. The href attribute is used to
specify the email address.

What is the purpose of the <style> tag in


HTML?
A) To define the style of a web page using CSS
B) To define the content that is displayed on the page
C) To define the title and other metadata of the page
D) To define the footer of the page

Answer: A) To define the style of a web page using CSS

Laurence Svekis https://basescripts.com/


22

Explanation: The <style> tag is used to define the style of an


HTML document using CSS. It can be used to set font styles,
colors, layout, and other visual aspects of a web page.

Which HTML tag is used to create a dropdown


menu?
A) <ul>
B) <li>
C) <select>
D) <option>

Answer: C) <select>
Explanation: The <select> tag is used to create a dropdown
menu in HTML. The <option> tag is used to define each item in
the menu

Which HTML tag is used to create a table?


A) <table>
B) <tr>
C) <td>
D) <th>

Answer: A) <table>

Laurence Svekis https://basescripts.com/


23

Explanation: The <table> tag is used to create a table in HTML. It


is typically followed by the <tr> tag to define each row, and the
<td> or <th> tag to define each cell within the row.

What is the purpose of the <form> tag in


HTML?
A) To create a hyperlink to another page
B) To define the content that is displayed on the page
C) To create a form for user input
D) To define the style of a web page using CSS

Answer: C) To create a form for user input


Explanation: The <form> tag is used to create a form in HTML,
allowing users to input data such as text, numbers, and
checkboxes. The form data can be submitted to a server using
the method attribute.

Which HTML tag is used to create a horizontal


rule?
A) <hr>
B) <br>

Laurence Svekis https://basescripts.com/


24

C) <p>
D) <div>

Answer: A) <hr>
Explanation: The <hr> tag is used to create a horizontal rule in
HTML, which can be used to visually separate sections of a web
page.

What is the purpose of the <footer> tag in


HTML?
A) To define the main heading of the page
B) To define the introductory content at the top of a page
C) To define the content that is displayed on the page
D) To define the footer of the page

Answer: D) To define the footer of the page


Explanation: The <footer> tag is used to define the footer of a
web page, typically containing copyright information, links to
related pages, or other additional content.

Laurence Svekis https://basescripts.com/


25

Which HTML tag is used to create an ordered


list?
A) <ul>
B) <ol>
C) <li>
D) <dl>

Answer: B) <ol>
Explanation: The <ol> tag is used to create an ordered list in
HTML, where each item is numbered. The <li> tag is used to
define each item in the list.

What is the purpose of the <head> tag in


HTML?
A) To define the main heading of the page
B) To define the content that is displayed on the page
C) To define the title and other metadata of the page
D) To define the introductory content at the top of a page

Answer: C) To define the title and other metadata of the page


Explanation: The <head> tag is used to define the title and other
metadata of an HTML document, such as keywords, description,
and character encoding. It is not displayed on the web page.

Laurence Svekis https://basescripts.com/


26

Which HTML tag is used to create a checkbox?


A) <input type="text">
B) <input type="password">
C) <input type="checkbox">
D) <input type="radio">

Answer: C) <input type="checkbox">

Explanation: The <input type="checkbox"> tag is used to create


a checkbox in HTML, which can be used to allow users to select
one or more options from a list.

What is the purpose of the <form> tag in


HTML?
A) To define a section of a web page
B) To create a hyperlink to another page
C) To define a form for user input
D) To define a table of data

Answer: C) To define a form for user input

Laurence Svekis https://basescripts.com/


27

Explanation: The <form> tag is used to define a form for user


input, such as a search box or a registration form. It contains
input elements such as text boxes, checkboxes, and radio
buttons.

Which HTML tag is used to create a table?


A) <table>
B) <tr>
C) <td>
D) <th>

Answer: A) <table>
Explanation: The <table> tag is used to create a table in HTML.
The <tr> tag is used to define each row in the table, while the
<td> tag is used to define each cell in the table. The <th> tag is
used to define header cells in the table.

What is the purpose of the target attribute in


the <a> tag?
A) To specify the URL of the link
B) To add a caption to the link
C) To define the size of the link

Laurence Svekis https://basescripts.com/


28

D) To specify where the linked document should be displayed

Answer: D) To specify where the linked document should be


displayed
Explanation: The target attribute is used to specify where the
linked document should be displayed, such as in a new window or
in the same window as the link.

Which HTML tag is used to create a heading?


A) <h1>
B) <h2>
C) <h3>
D) <h4>

Answer: A) <h1>
Explanation: The <h1> tag is used to create a main heading in
HTML. The <h2> tag is used for subheadings, and so on.

What is the purpose of the <textarea> tag in


HTML?
A) To create a text box for user input
B) To display a video on a web page

Laurence Svekis https://basescripts.com/


29

C) To define a section of a web page


D) To create a button for user input

Answer: A) To create a text box for user input


Explanation: The <textarea> tag is used to create a large text
box for user input, such as for comments or messages.

Which HTML tag is used to create a horizontal


line?
A) <br>
B) <hr>
C) <p>
D) <em>

Answer: B) <hr>
Explanation: The <hr> tag is used to create a horizontal line in
HTML. It is often used to separate different sections of a web
page.

Laurence Svekis https://basescripts.com/


30

What is the purpose of the <video> tag in


HTML?
A) To create a section of a web page
B) To define a table of data
C) To display a video on a web page
D) To create a hyperlink to another page

Answer: C) To display a video on a web page

Explanation: The <video> tag is used to embed a video on a web


page. It can include attributes such as width, height, and
autoplay.

Which HTML tag is used to create a button?


A) <input>
B) <button>
C) <form>
D) <select>

Answer: B) <button>
Explanation: The <button> tag is used to create a button in
HTML. It can be used for user input, such as for submitting a
form or triggering an action.

Laurence Svekis https://basescripts.com/


31

What is the purpose of the <form> tag in


HTML?
A) To create a table on a web page
B) To create a hyperlink to another page
C) To create a form for user input
D) To define the header of the page

Answer: C) To create a form for user input


Explanation: The <form> tag is used to create a form on an
HTML page that allows users to input data. This data can then be
submitted to a server for processing.

Which HTML tag is used to create a hyperlink


to another webpage?
A) <link>
B) <a>
C) <href>
D) <url>

Answer: B) <a>

Laurence Svekis https://basescripts.com/


32

Explanation: The <a> tag is used to create a hyperlink in HTML.


The href attribute is used to specify the URL of the webpage
being linked to.

What is the purpose of the <article> tag in


HTML?
A) To define a section of the page that contains related content
B) To define the main heading of the page
C) To define the footer of the page
D) To define the introductory content at the top of a page

Answer: A) To define a section of the page that contains related


content
Explanation: The <article> tag is used to define a section of an
HTML page that contains related content, such as a blog post,
news article, or product description.

Which HTML tag is used to create a table?


A) <table>
B) <tr>
C) <td>
D) <th>

Laurence Svekis https://basescripts.com/


33

Answer: A) <table>
Explanation: The <table> tag is used to create a table in HTML.
The <tr> tag is used to define each row in the table, while the
<td> and <th> tags are used to define each cell in the table.

What is the purpose of the <audio> tag in


HTML?
A) To create a hyperlink to an audio file
B) To embed an audio file in an HTML page
C) To create a dropdown menu
D) To create a table

Answer: B) To embed an audio file in an HTML page


Explanation: The <audio> tag is used to embed an audio file,
such as an MP3 or WAV file, in an HTML page. The source
attribute is used to specify the URL of the audio file.

Which HTML tag is used to define a section of


the page that contains navigation links?
A) <nav>

Laurence Svekis https://basescripts.com/


34

B) <section>
C) <article>
D) <header>

Answer: A) <nav>
Explanation: The <nav> tag is used to define a section of an
HTML page that contains navigation links, such as a menu or a
list of links to other pages on the website.

What is the purpose of the <video> tag in


HTML?
A) To create a hyperlink to a video file
B) To embed a video file in an HTML page
C) To create a dropdown menu
D) To create a table

Answer: B) To embed a video file in an HTML page


Explanation: The <video> tag is used to embed a video file, such
as an MP4 or MOV file, in an HTML page. The source attribute is
used to specify the URL of the video file.

Laurence Svekis https://basescripts.com/


35

Which HTML tag is used to define a section of


the page that contains contact information?
A) <address>
B) <section>
C) <article>
D) <header>

Answer: A) <address>
Explanation: The <address> tag is used to define a section of an
HTML page that contains contact information, such as a physical
address, email address, or phone number

What is the purpose of the <img> tag in


HTML?
A) To create a hyperlink to another page
B) To create a form for user input
C) To display an image on a web page
D) To define the header of the page

Answer: C) To display an image on a web page

Laurence Svekis https://basescripts.com/


36

Explanation: The <img> tag is used to display an image on an


HTML page. The src attribute is used to specify the URL of the
image.

Which HTML tag is used to create a list of


items with bullets?
A) <ul>
B) <ol>
C) <li>
D) <dl>

Answer: A) <ul>
Explanation: The <ul> tag is used to create an unordered list of
items with bullets. Each item in the list is defined with the <li>
tag.

What is the purpose of the <label> tag in


HTML?
A) To create a table on a web page
B) To create a hyperlink to another page
C) To define a label for an input element

Laurence Svekis https://basescripts.com/


37

D) To define the header of the page

Answer: C) To define a label for an input element


Explanation: The <label> tag is used to define a label for an input
element, such as a text box or radio button, in an HTML form.
The for attribute is used to specify which input element the label
is associated with.

Which HTML tag is used to create a dropdown


list?
A) <input>
B) <select>
C) <option>
D) <textarea>

Answer: B) <select>
Explanation: The <select> tag is used to create a dropdown list in
an HTML form. Each option in the list is defined with the
<option> tag.

Laurence Svekis https://basescripts.com/


38

What is the purpose of the <iframe> tag in


HTML?
A) To display an image on a web page
B) To embed another web page within an HTML page
C) To create a form for user input
D) To define the header of the page

Answer: B) To embed another web page within an HTML page


Explanation: The <iframe> tag is used to embed another web
page within an HTML page. The src attribute is used to specify the
URL of the web page to be embedded.

Which HTML tag is used to create a header for


a section of a web page?
A) <h1>
B) <p>
C) <div>
D) <span>

Answer: A) <h1>

Laurence Svekis https://basescripts.com/


39

Explanation: The <h1> tag is used to create a header for a


section of an HTML page. There are six header tags in HTML,
ranging from <h1> (largest) to <h6> (smallest).

What is the purpose of the <blockquote> tag


in HTML?
A) To define a block of code on a web page
B) To create a hyperlink to another page
C) To define a long quotation on a web page
D) To create a form for user input

Answer: C) To define a long quotation on a web page


Explanation: The <blockquote> tag is used to define a long
quotation on an HTML page. The cite attribute can be used to
specify the source of the quotation.

Which HTML tag is used to create a horizontal


line on a web page?
A) <hr>
B) <br>
C) <div>

Laurence Svekis https://basescripts.com/


40

D) <span>

Answer: A) <hr>
Explanation: The <hr> tag is used to create a horizontal line on
an HTML page. This is often used to separate sections of the
page.

Which HTML element is used to define a


paragraph?
A. <p>
B. <para>
C. <paragraph>
D. <pg>

Answer: A
Explanation: The <p> element is used to define a paragraph in
HTML.

Which HTML element is used to define a


header for a section or article?
A. <header>

Laurence Svekis https://basescripts.com/


41

B. <section-header>
C. <article-header>
D. <head>

Answer: A
Explanation: The <header> element is used to define a header
for a section or article in HTML.

Which HTML element is used to define a


footer for a section or article?
A. <footer>
B. <section-footer>
C. <article-footer>
D. <foot>

Answer: A
Explanation: The <footer> element is used to define a footer for
a section or article in HTML.

Laurence Svekis https://basescripts.com/


42

Which HTML element is used to create a


dropdown list?
A. <select>
B. <dropdown>
C. <list>
D. <menu>

Answer: A
Explanation: The <select> element is used to create a dropdown
list in HTML.

Which HTML element is used to create a text


input field?
A. <input type="text">
B. <input type="input">
C. <input type="textbox">
D. <input type="field">

Answer: A
Explanation: The <input type="text"> element is used to create a
text input field in HTML.

Laurence Svekis https://basescripts.com/


43

Which HTML element is used to create a


checkbox?
A. <input type="checkbox">
B. <input type="check">
C. <input type="box">
D. <input type="toggle">

Answer: A
Explanation: The <input type="checkbox"> element is used to
create a checkbox in HTML.

Which HTML element is used to create a radio


button?
A. <input type="radio">
B. <input type="button">
C. <input type="choice">
D. <input type="select">

Answer: A
Explanation: The <input type="radio"> element is used to create
a radio button in HTML.

Laurence Svekis https://basescripts.com/


44

Which HTML element is used to create a


button?
A. <button>
B. <input type="button">
C. <input type="submit">
D. <input type="reset">

Answer: A
Explanation: The <button> element is used to create a button in
HTML.

Which HTML element is used to create an


image map?
A. <map>
B. <imagemap>
C. <area>
D. <imgmap>

Answer: A
Explanation: The <map> element is used to create an image map
in HTML. The image map is made up of clickable areas defined
with the <area> element.

Laurence Svekis https://basescripts.com/


45

Which HTML element is used to create a video


player?
A. <video>
B. <player>
C. <mediaplayer>
D. <movie>

Answer: A
Explanation: The <video> element is used to create a video
player in HTML.

Which HTML element is used to define a


paragraph?
A. <p>
B. <par>
C. <pg>
D. <para>

Answer: A

Laurence Svekis https://basescripts.com/


46

Explanation: The <p> element is used to define a paragraph in


HTML. The text inside the element is treated as a separate block
of content.

Which HTML element is used to create a


hyperlink to an email address?
A. <mail>
B. <email>
C. <link>
D. <a>

Answer: D
Explanation: The <a> element is used to create hyperlinks,
including links to email addresses using the "mailto" protocol.

Which HTML attribute is used to specify an


alternative text description for an image?
A. alt
B. src
C. title
D. href

Laurence Svekis https://basescripts.com/


47

Answer: A
Explanation: The "alt" attribute is used to specify an alternative
text description for an image, which is displayed if the image
cannot be loaded or if the user is using assistive technology.

Which HTML element is used to create a


paragraph?
A. <p>
B. <br>
C. <div>
D. <span>

Answer: A
Explanation: The <p> element is used to create a paragraph in
HTML.

Which HTML element is used to create a


button?
A. <button>
B. <input>

Laurence Svekis https://basescripts.com/


48

C. <a>
D. <submit>

Answer: A
Explanation: The <button> element is used to create a button in
HTML, which can be used to trigger JavaScript functions or submit
a form.

Which HTML element is used to create a


horizontal rule?
A. <hr>
B. <line>
C. <rule>
D. <divider>

Answer: A
Explanation: The <hr> element is used to create a horizontal
rule, which is a line that separates content in an HTML document.

Laurence Svekis https://basescripts.com/


49

Which HTML attribute is used to specify the


width of an image?
A. width
B. size
C. length
D. dimension

Answer: A
Explanation: The "width" attribute is used to specify the width of
an image in pixels or as a percentage of the width of the parent
element.

Which HTML element is used to create a


dropdown list?
A. <select>
B. <option>
C. <input>
D. <menu>

Answer: A

Laurence Svekis https://basescripts.com/


50

Explanation: The <select> element is used to create a dropdown


list in HTML, which allows the user to select one option from a list
of options defined with <option> elements.

Which HTML attribute is used to specify the


background color of an element?
A. bgcolor
B. background-color
C. color
D. style

Answer: B
Explanation: The "background-color" attribute is used to specify
the background color of an HTML element.

Which HTML element is used to create a


definition list?
A. <ul>
B. <ol>
C. <dl>
D. <dt>

Laurence Svekis https://basescripts.com/


51

Answer: C
Explanation: The <dl> element is used to create a definition list
in HTML, which consists of a list of terms (<dt>) and their
definitions (<dd>).

Which HTML attribute is used to specify the


alignment of an image?
A. align
B. center
C. position
D. float

Answer: A
Explanation: The "align" attribute is used to specify the alignment
of an image in HTML, with values such as "left", "right", and
"center".

What is the correct HTML element for adding


a line of text?
A. <p>
B. <h1>
C. <span>

Laurence Svekis https://basescripts.com/


52

D. <br>

Answer: C
Explanation: The <span> element is used to add a line of text in
HTML. It is an inline element and can be used to apply styling to
small pieces of text within larger elements.

Which HTML element is used to define a


paragraph of text?
A. <p>
B. <div>
C. <span>
D. <article>

Answer: A
Explanation: The <p> element is used to define a paragraph of
text in HTML. It is a block-level element and is used to separate
blocks of content.

Laurence Svekis https://basescripts.com/


53

What is the correct HTML element for adding


a horizontal rule?
A. <hr>
B. <br>
C. <line>
D. <rule>

Answer: A
Explanation: The <hr> element is used to add a horizontal rule in
HTML. It is a self-closing tag and does not require a closing tag.

Which HTML element is used to add a video to


a web page?
A. <video>
B. <movie>
C. <media>
D. <play>

Answer: A
Explanation: The <video> element is used to add a video to a
web page in HTML. The "src" attribute is used to specify the URL
of the video.

Laurence Svekis https://basescripts.com/


54

What is the correct HTML element for adding


a hyperlink to an email address?
A. <mail>
B. <email>
C. <a>
D. <link>

Answer: C
Explanation: The <a> element is used to add a hyperlink in
HTML. To create a hyperlink to an email address, the "href"
attribute should be set to "mailto:emailaddress".

Which HTML element is used to define a


header for a web page or section?
A. <head>
B. <header>
C. <title>
D. <h1>

Answer: B

Laurence Svekis https://basescripts.com/


55

Explanation: The <header> element is used to define a header


for a web page or section in HTML. It can contain headings, logos,
navigation menus, and other elements.

Which HTML element is used to add a


comment to a web page?
A. <!-- -->
B. /* */
C. //
D. <comment>

Answer: A
Explanation: The <!-- --> syntax is used to add a comment to a
web page in HTML. Comments are used to provide notes and
reminders for developers and are not displayed in the browser.

Which HTML element is used to define a


footer for a web page or section?
A. <footer>
B. <end>
C. <bottom>

Laurence Svekis https://basescripts.com/


56

D. <section>

Answer: A
Explanation: The <footer> element is used to define a footer for
a web page or section in HTML. It can contain copyright
information, contact details, and other elements.

Which HTML element is used to add a


background image to a web page?
A. <img>
B. <background>
C. <style>
D. <body>

Answer: D
Explanation: The <body> element is used to define the content of
a web page in HTML. The "background" attribute can be used to
add a background image to the body of the page.

Laurence Svekis https://basescripts.com/


57

Which HTML element is used to add a tooltip


to an element?
A. <tooltip>
B. <title>
C. <hint>
D. <info>

Answer: B
Explanation: The <title> element is used to add a tooltip to an
element in HTML. When the user hovers over the element, the
tooltip will be displayed.

Which HTML element is used to create a


heading with smaller font size than <h1>?
A. <h2>
B. <h3>
C. <h4>
D. <h5>

Answer: D

Laurence Svekis https://basescripts.com/


58

Explanation: <h5> is the HTML element used to create a heading


with a smaller font size than <h1>. It is smaller than <h4> and
larger than <h6>.

Which HTML attribute is used to specify the


alternate text for an image?
A. alt
B. title
C. src
D. href

Answer: A
Explanation: The "alt" attribute is used to specify the alternate
text for an image. This text is displayed if the image fails to load
or if the user is visually impaired and uses a screen reader.

Which HTML element is used to define a


paragraph?
A. <p>
B. <para>
C. <text>

Laurence Svekis https://basescripts.com/


59

D. <pg>

Answer: A
Explanation: The <p> element is used to define a paragraph in
HTML. It is used to group together a block of text that forms a
logical unit.

Which HTML element is used to create a


horizontal line?
A. <hr>
B. <line>
C. <br>
D. <hrz>

Answer: A
Explanation: The <hr> element is used to create a horizontal line
in HTML. It is a self-closing tag and does not require a closing
tag.

Laurence Svekis https://basescripts.com/


60

Which HTML attribute is used to specify the


background color of an element?
A. bgcolor
B. background
C. color
D. style

Answer: A
Explanation: The "bgcolor" attribute is used to specify the
background color of an element in HTML. However, this attribute
is deprecated in HTML5 and should be avoided in favor of CSS.

Which HTML element is used to create a


hyperlink to an email address?
A. <a>
B. <link>
C. <mail>
D. <email>

Answer: A

Laurence Svekis https://basescripts.com/


61

Explanation: The <a> element is used to create a hyperlink to an


email address in HTML. The "href" attribute should be set to
"mailto:emailaddress".

Which HTML element is used to define a


definition list?
A. <dl>
B. <ul>
C. <ol>
D. <dt>

Answer: A
Explanation: The <dl> element is used to define a definition list
in HTML. The list consists of a series of terms (<dt>) and their
definitions (<dd>).

Which HTML attribute is used to specify the


width of an element?
A. width
B. size
C. length

Laurence Svekis https://basescripts.com/


62

D. style

Answer: A
Explanation: The "width" attribute is used to specify the width of
an element in HTML. This attribute can be used on many different
elements, such as tables, images, and input elements.

Which HTML element is used to create a


dropdown list?
A. <select>
B. <input>
C. <option>
D. <menu>

Answer: A
Explanation: The <select> element is used to create a dropdown
list in HTML. The options for the list are defined with the
<option> element.

Laurence Svekis https://basescripts.com/


63

Which HTML attribute is used to specify the


target window for a link?
A. target
B. window
C. link
D. href

Answer: A
Explanation: The "target" attribute is used to specify the target
window for a link in HTML. The value "_blank" is used to open the
link in a new window or tab.

Which HTML element is used to define a


paragraph?
A. <p>
B. <para>
C. <text>
D. <pg>

Answer: A

Laurence Svekis https://basescripts.com/


64

Explanation: The <p> element is used to define a paragraph in


HTML. It is a block-level element and can contain other inline
elements.

Which HTML attribute is used to specify the


alternate text for an image?
A. alt
B. src
C. href
D. title

Answer: A
Explanation: The "alt" attribute is used to specify the alternate
text for an image in HTML. This text is displayed when the image
cannot be loaded or when a user is using a screen reader.

Which HTML element is used to create a


hyperlink to an email address?
A. <a href="mailto:">
B. <a href="http:">
C. <a href="ftp:">

Laurence Svekis https://basescripts.com/


65

D. <a href="tel:">

Answer: A
Explanation: The <a href="mailto:"> element is used to create a
hyperlink to an email address in HTML. The email address is
specified in the "href" attribute.

Which HTML element is used to create a


horizontal line?
A. <hr>
B. <line>
C. <hline>
D. <horizontal>

Answer: A
Explanation: The <hr> element is used to create a horizontal line
in HTML. It is a self-closing tag and does not require a closing
tag.

Laurence Svekis https://basescripts.com/


66

Which HTML element is used to create a


definition list?
A. <dl>
B. <ul>
C. <ol>
D. <dt>

Answer: A
Explanation: The <dl> element is used to create a definition list
in HTML. Each item in the list is defined with the <dt> element
for the term and the <dd> element for the definition.

Which HTML element is used to create a


dropdown list?
A. <select>
B. <option>
C. <input>
D. <dropdown>

Answer: A

Laurence Svekis https://basescripts.com/


67

Explanation: The <select> element is used to create a dropdown


list in HTML. Each option in the list is defined with the <option>
element.

Which HTML element is used to create a


checkbox?
A. <input type="checkbox">
B. <input type="radio">
C. <input type="text">
D. <input type="submit">

Answer: A
Explanation: The <input type="checkbox"> element is used to
create a checkbox in HTML. It allows users to select one or more
options from a list.

Which HTML element is used to create a radio


button?
A. <input type="radio">
B. <input type="checkbox">
C. <input type="text">

Laurence Svekis https://basescripts.com/


68

D. <input type="submit">

Answer: A
Explanation: The <input type="radio"> element is used to create
a radio button in HTML. It allows users to select only one option
from a list.

Which HTML element is used to create a video


player?
A. <video>
B. <audio>
C. <media>
D. <player>

Answer: A
Explanation: The <video> element is used to create a video
player in HTML. The "src" attribute is used to specify the URL of
the video.

Laurence Svekis https://basescripts.com/


69

Which HTML element is used to create a


header section?
A. <header>
B. <head>
C. <h>
D. <section>

Answer: A
Explanation: The <header> element is used to create a header
section in HTML. It is typically used to contain a logo, navigation
menu, or other introductory content at the top of a page.

Laurence Svekis https://basescripts.com/

You might also like