MCQs for Class 4
Lists
in HTML
1. Which HTML tag is used
to create an unordered list?
o A) <ol>
o B) <ul>
o C) <dl>
o D) <li>
Answer: B) <ul>
2. What is the default
bullet style for items in an unordered list?
o A) Square
o B) Circle
o C) Disc
o D) None
Answer: C) Disc
3. Which HTML tag is used
to create a list item?
o A) <li>
o B) <list>
o C) <item>
o D) <entry>
Answer: A) <li>
4. How do you create a
nested list in HTML?
o A) By using the
<li> tag within another <li> tag
o B) By placing <ul>
or <ol> tags inside another <ul> or <ol>
o C) By using the
<nested> tag
o D) By adding margin to
the <ul> tag
Answer: B) By placing <ul> or <ol> tags inside another
<ul> or <ol>
5. Which HTML tag is used
to create an ordered list?
o A) <ul>
o B) <ol>
o C) <dl>
o D) <li>
Answer: B) <ol>
6. What does the <dl>
tag create in HTML?
o A) Unordered list
o B) Ordered list
o C) Definition list
o D) List item
Answer: C) Definition list
7. In a definition list,
which tag is used to define a term?
o A) <dt>
o B) <dd>
o C) <li>
o D) <dl>
Answer: A) <dt>
8. In a definition list,
which tag is used to provide the description or definition of a term?
o A) <dt>
o B) <dd>
o C) <li>
o D) <dl>
Answer: B) <dd>
9. How can you change the
style of list bullets in an unordered list using CSS?
o A) By changing the
list-style-type property
o B) By changing the
font-family property
o C) By changing the
text-align property
o D) By changing the color
property
Answer: A) By changing the list-style-type property
10.
What is the purpose of using the <ol type="A">
attribute?
o A) To change the bullet
style to squares
o B) To create a
definition list
o C) To use uppercase
letters for list items
o D) To create a nested
list
Answer: C) To use uppercase letters for list items
11.
Which HTML element is not used for creating lists?
o A) <ul>
o B) <ol>
o C) <dl>
o D) <p>
Answer: D) <p>
12.
What tag is used to define a list item in an ordered list?
o A) <li>
o B) <item>
o C) <list-item>
o D) <order>
Answer: A) <li>
13.
Which of the following is the correct way to create a nested list
within an ordered list?
o A)
<ol><li>Parent<li><ol><li>Child</li></ol></li></ol>
o B)
<ol><li>Parent</li><ul><li>Child</li></ul></ol>
o C)
<ol><li>Parent<ul><li>Child</li></ul></li></ol>
o D)
<ol><li>Parent<ol><li>Child</li></ol></li></ol>
Answer: C)
<ol><li>Parent<ul><li>Child</li></ul></li></ol>
14.
What will be the output of the following HTML code?
<ul>
<li>Item 1</li>
<li>Item 2
<ul>
<li>Subitem
1</li>
<li>Subitem
2</li>
</ul>
</li>
</ul>
o A) An unordered list
with subitems nested within an item
o B) An ordered list with
subitems nested within an item
o C) A definition list
with subitems
o D) An unordered list
with no subitems
Answer: A) An unordered list with subitems nested within an item
15.
Which HTML tag would you use to describe a list of products and
their prices?
o A) <ul> and
<li>
o B) <ol> and
<li>
o C) <dl>,
<dt>, and <dd>
o D) <table>,
<tr>, <td>
Answer: C) <dl>, <dt>, and <dd>
16.Which HTML attribute can be used to specify the type of list
item marker in an ordered list?
o A) list-style-type
o B) type
o C) marker
o D) bullet
Answer: B) type
17.How do you create a list with Roman numerals
as markers?
o A) <ol
type="i">
o B) <ol
type="roman">
o C) <ol
type="I">
o D) <ol
type="R">
Answer: A) <ol type="i">
18. Which of the following
is true about the <dl> tag?
o A) It defines an ordered
list.
o B) It defines an
unordered list.
o C) It defines a
definition list.
o D) It defines a list
item.
Answer: C) It defines a definition list.
19. In a nested list, which
HTML element represents a sub-list?
o A) <ul> or
<ol> inside another <ul> or <ol>
o B) <li> inside
another <li>
o C) <dl> inside
another <dl>
o D) <nested>
Answer: A) <ul> or <ol> inside another <ul> or
<ol>
20. Which of the following
tags should be used to create a list of ingredients and their quantities?
o A) <ul> and
<li>
o B) <dl>,
<dt>, and <dd>
o C) <ol> and
<li>
o D) <table>,
<tr>, <td>
Answer: B) <dl>, <dt>, and <dd>
21. What will the following
HTML code display?
<ol>
<li>First</li>
<li>Second
<ol>
<li>Sub
First</li>
<li>Sub
Second</li>
</ol>
</li>
</ol>
o A) An ordered list with
nested ordered list
o B) An unordered list
with nested ordered list
o C) A definition list
with nested ordered list
o D) An ordered list with
nested unordered list
Answer: A) An ordered list with nested ordered list
22. Which HTML element is
used to group related items together in a definition list?
o A) <dd>
o B) <dt>
o C) <li>
o D) <ul>
Answer: A) <dd>
23. How do you display an
unordered list with square bullets?
o A) Use list-style-type:
square; in CSS
o B) Use <ul
type="square"> in HTML
o C) Use <ul
style="list-style-type: square;"> in HTML
o D) Use bullet: square;
in CSS
Answer: A) Use list-style-type: square; in CSS
24. What is the default type
of bullet for an unordered list in HTML?
o A) Circle
o B) Square
o C) Disc
o D) None
Answer: C) Disc
25.
In which situation would you use a definition list?
o A) To list items in a
specific order
o B) To provide
descriptions or definitions of terms
o C) To create a bulleted
list
o D) To organize items in
a numerical sequence
Answer: B) To provide descriptions or definitions of terms
26.
Which of the following list types can be used to create a
checklist?
o A) Ordered list
o B) Unordered list with
checkboxes
o C) Definition list
o D) None
Answer: B) Unordered list with checkboxes (typically achieved with
additional HTML/CSS for checkboxes)
27.
How can you specify a different type of marker for list items in
an unordered list using HTML attributes?
o A) Use list-style-type
in CSS
o B) Use the type
attribute in <ul>
o C) Use marker-type in
HTML
o D) Use bullet-style in
HTML
Answer: A) Use list-style-type in CSS
28.
Which HTML tag is used to create a list of items with a specific
order?
o A) <ul>
o B) <ol>
o C) <dl>
o D) <li>
Answer: B) <ol>
29.
What is the purpose of the type attribute in an ordered list?
o A) To specify the type
of marker used for list items
o B) To change the style
of the list
o C) To specify the type
of list items (e.g., numbers, letters)
o D) To define the
description of list items
Answer: C) To specify the type of list items (e.g., numbers,
letters)
30.
What will the following code produce?
<ul>
<li>Item 1
<ul>
<li>Subitem
1</li>
<li>Subitem
2</li>
</ul>
</li>
<li>Item 2</li>
</ul>
o A) A nested unordered
list
o B) An unordered list
with no nested items
o C) A definition list
o D) An ordered list
Answer: A) A nested unordered list
31. Which attribute of the
<ol> tag allows you to use uppercase Roman numerals for list items?
o A) type="i"
o B) type="I"
o C)
type="roman"
o D) type="A"
Answer: B) type="I"
32. What type of list does
the following HTML code create?
<ol type="A">
<li>Introduction</li>
<li>Body
<ol
type="1">
<li>Section
1</li>
<li>Section
2</li>
</ol>
</li>
<li>Conclusion</li>
</ol>
o A) An ordered list with
uppercase letters and a nested ordered list with numbers
o B) An unordered list
with Roman numerals and a nested ordered list with letters
o C) A definition list
with sub-items
o D) An ordered list with
nested unordered list
Answer: A) An ordered list with uppercase letters and a nested
ordered list with numbers
33. Which of the following
will create a nested unordered list with square bullets inside an ordered list?
o A)
<ol><li>Item 1<ul style="list-style-type:
square;"><li>Subitem
1</li></ul></li></ol>
o B)
<ol><li>Item 1<ul><li>Subitem
1</li></ul></li></ol>
o C) <ul><li>Item
1<ol><li>Subitem 1</li></ol></li></ul>
o D) <ul
style="list-style-type: square;"><li>Item
1<ul><li>Subitem 1</li></ul></li></ul>
Answer: A) <ol><li>Item 1<ul
style="list-style-type: square;"><li>Subitem
1</li></ul></li></ol>
34. What is the default
marker type for an ordered list?
o A) Roman numerals
o B) Uppercase letters
o C) Lowercase letters
o D) Numbers
Answer: D) Numbers
35. How can you create a
list where each item has a different bullet style?
o A) By using different
CSS styles for each <li>
o B) By using different
<ul> tags with different styles
o C) By setting the
list-style-type attribute for each <li>
o D) By using the type
attribute for each <li>
Answer: A) By using different CSS styles for each <li>
36. What will the following
HTML code produce?
<ul>
<li>Fruit
<ul>
<li>Apple</li>
<li>Orange
<ul>
<li>Mandarin</li>
<li>Navel</li>
</ul>
</li>
</ul>
</li>
<li>Vegetable</li>
</ul>
o A) An unordered list
with nested unordered lists
o B) An ordered list with
nested unordered lists
o C) A definition list
with nested unordered lists
o D) An unordered list
with nested ordered lists
Answer: A) An unordered list with nested unordered lists
37. Which CSS property is
used to change the marker of a list item?
o A) list-style
o B) marker-style
o C) list-marker
o D) bullet-style
Answer: A) list-style
38. What HTML element is
used to define a term in a definition list?
o A) <dl>
o B) <dt>
o C) <dd>
o D) <li>
Answer: B) <dt>
39. Which tag should you use
to include a list of authors in a book index?
o A) <ul>
o B) <ol>
o C) <dl>
o D) <li>
Answer: C) <dl>
40.
What will the following HTML code create?
<ul>
<li>Item A</li>
<li>Item B
<ol>
<li>Subitem
1</li>
<li>Subitem
2</li>
</ol>
</li>
<li>Item C</li>
</ul>
o A) An unordered list
with a nested ordered list
o B) An ordered list with
a nested unordered list
o C) A definition list
with a nested ordered list
o D) An unordered list
with nested definition list
Answer: A) An unordered list with a nested ordered list
41.
How do you create a list where items are marked with circles?
o A) Use list-style-type:
circle; in CSS
o B) Use <ul
type="circle"> in HTML
o C) Use list-style-type:
disc; in CSS
o D) Use bullet-style:
circle; in CSS
Answer: A) Use list-style-type: circle; in CSS
42.
Which HTML tag is incorrect for creating a list?
o A) <ul>
o B) <ol>
o C) <dl>
o D) <list>
Answer: D) <list>
43.
What is the purpose of using nested lists in HTML?
o A) To create more
complex and hierarchical list structures
o B) To display images
within list items
o C) To create tables
within lists
o D) To format text within
lists
Answer: A) To create more complex and hierarchical list structures
44.
Which HTML element is used to describe the description of a term
in a definition list?
o A) <dt>
o B) <dl>
o C) <dd>
o D) <li>
Answer: C) <dd>
45.
How can you display a list item with no marker in CSS?
o A) Use list-style-type:
none;
o B) Use marker-style:
none;
o C) Use list-item-style:
none;
o D) Use bullet: none;
Answer: A) Use list-style-type: none;
*******************************************
