MCQs on Lists and Nesting | HTML

Chapter 4 of HTML focuses on organizing and presenting content using different types of lists: Ordered Lists (
), Unordered Lists (), and Definition Lists (). These structures help arrange data efficiently, ensuring easy navigation and comprehension. Below are 30 multiple-choice questions (MCQs) covering these list types.

MCQs on Ordered Lists, Unordered Lists, and Definition Lists

Ordered Lists (<ol>)

  1. Which tag is used to create an ordered list in HTML?
    a) <ul>
    b) <dl>
    c) <ol>
    d) <list>
  2. What attribute can be used to change the starting number of an ordered list?
    a) type
    b) start
    c) order
    d) begin
  3. How do you create a list item inside an ordered list?
    a) <item>
    b) <li>
    c) <olitem>
    d) <list>
  4. In an ordered list, how are list items typically numbered?
    a) Alphabetically
    b) Roman numerals
    c) Numbers
    d) Bullets
  5. What is the default numbering style of an ordered list?
    a) Alphabet
    b) Roman numerals
    c) Numbers (1, 2, 3)
    d) Bullets

Unordered Lists (<ul>)

  1. Which HTML tag is used to define an unordered list?
    a) <ol>
    b) <ul>
    c) <list>
    d) <li>
  2. Which HTML tag is used to define a list item within an unordered list?
    a) <list>
    b) <olitem>
    c) <li>
    d) <ulitem>
  3. What is the default marker type for list items in an unordered list?
    a) Square
    b) Circle
    c) Disc
    d) None
  4. How do you change the bullet style in an unordered list?
    a) Using the style attribute
    b) With the “bullet-style” property
    c) By changing the <li> tag
    d) Using the type attribute
  5. Which of the following is NOT a valid option for the “list-style-type” property in CSS for unordered lists?
    a) square
    b) disc
    c) circle
    d) numeral

Definition Lists (<dl>)

  1. Which HTML tag is used to define a definition list?
    a) <ol>
    b) <ul>
    c) <dl>
    d) <def>
  2. In a definition list, which tag is used for the term being defined?
    a) <li>
    b) <dt>
    c) <dd>
    d) <term>
  3. Which HTML tag is used to define the description of a term in a definition list?
    a) <dd>
    b) <dl>
    c) <dt>
    d) <def>
  4. What is the primary purpose of a definition list in HTML?
    a) To display an ordered sequence
    b) To group related items
    c) To define terms and their descriptions
    d) To create navigation links
  5. Can a definition list include both <dt> and <dd> tags multiple times?
    a) Yes, it is common
    b) No, only one <dt> per <dd>
    c) No, only one <dd> per <dt>
    d) It is not allowed

Combining Lists

  1. Which of the following is a valid example of a nested list in HTML?
    a) <ul><ol><li>Item</li></ol></ul>
    b) <ol><ul><li>Item</li></ul></ol>
    c) <dl><ul><li>Item</li></ul></dl>
    d) <ol><ul><ol><li>Item</li></ol></ul></ol>
  2. What happens when an unordered list is nested inside an ordered list?
    a) The nested list uses the same numbering style as the parent
    b) The nested list uses bullet points
    c) The parent list’s numbering restarts for each nested list
    d) Both lists will disappear
  3. Which of the following will display a list of items numbered 1, 2, 3 followed by a bullet list under each number?
    a) <ol><ul><li>Item 1</li></ul><li>Item 2</li></ol>
    b) <ol><li>Item 1<ul><li>Subitem 1</li></ul></li></ol>
    c) <ul><ol><li>Item</li></ol></ul>
    d) <ol><ul><ol><li>Item</li></ol></ul></ol>
  4. How would you create a definition list inside an unordered list?
    a) <ul><dl><li>Term</li></dl></ul>
    b) <ul><li><dl><dt>Term</dt><dd>Description</dd></dl></li></ul>
    c) <ul><dl><dd>Description</dd></dl></ul>
    d) <ul><dt>Term</dt></ul>
  5. What is the result of using the <ol> tag inside a <dl> tag?
    a) Nested ordered lists are ignored
    b) The ordered list behaves normally
    c) It creates an invalid HTML structure
    d) It will be treated as a definition term

List Styling and Attributes

  1. What CSS property is used to change the bullet style in an unordered list?
    a) list-style-position
    b) list-style-type
    c) list-type
    d) bullet-style
  2. What attribute can be used to set a custom numbering system for an ordered list?
    a) type
    b) order
    c) format
    d) style
  3. Which CSS property controls the placement of list markers in lists?
    a) list-style-position
    b) list-align
    c) list-mark-position
    d) marker-placement
  4. Which of the following CSS rules would make an ordered list display Roman numerals?
    a) list-style-type: roman;
    b) list-style-type: upper-roman;
    c) list-style-type: numeric;
    d) list-style-type: roman-numeral;
  5. Which of the following attributes does NOT apply to a <ul> or <ol> tag?
    a) list-style-type
    b) start
    c) type
    d) padding

Advanced List Features

  1. What is the purpose of the “start” attribute in an ordered list?
    a) To set the number to start from
    b) To determine the list style
    c) To change the list type
    d) To set the list items in a reverse order
  2. How can you create a nested definition list inside an ordered list?
    a) <ol><dl><dt>Term</dt><dd>Description</dd></dl></ol>
    b) <ol><li><dl><dt>Term</dt><dd>Description</dd></dl></li></ol>
    c) <ol><dl><dd>Description</dd></ol></dl>
    d) <dl><ol><li>Item</li></ol></dl>
  3. Which property would be used to display list items horizontally instead of vertically?
    a) display: block;
    b) display: inline;
    c) list-style-position: inline;
    d) list-style-type: inline;
  4. How do you create a numbered list that starts at number 5 in HTML?
    a) <ol start=”5″>
    b) <ol type=”5″>
    c) <ol number=”5″>
    d) <ol value=”5″>
  5. What is the correct way to create an unordered list with custom bullet images?
    a) Using the list-style-image CSS property
    b) By changing the <li> tag
    c) By using <ul type=”image”>
    d) By using <img> tags within <li>

Here are the answers for the MCQs:

QnoAnswer
1c) <ol>
2b) start
3b) <li>
4c) Numbers
5c) Numbers (1, 2, 3)
6b) <ul>
7c) <li>
8c) Disc
9a) Using the style attribute
10d) numeral
11c) <dl>
12b) <dt>
13a) <dd>
14c) To define terms and their descriptions
15a) Yes, it is common
16b) <ol><ul><li>Item</li></ul></ol>
17b) The nested list uses bullet points
18b) <ol><li>Item 1<ul><li>Subitem 1</li></ul></li></ol>
19b) <ul><li><dl><dt>Term</dt><dd>Description</dd></dl></li></ul>
20c) It creates an invalid HTML structure
21b) list-style-type
22a) type
23a) list-style-position
24b) list-style-type: upper-roman;
25d) padding
26a) To set the number to start from
27b) <ol><li><dl><dt>Term</dt><dd>Description</dd></dl></li></ol>
28b) display: inline;
29a) <ol start=”5″>
30a) Using the list-style-image CSS property

Use a Blank Sheet, Note your Answers and Finally tally with our answer at last. Give Yourself Score.

X
error: Content is protected !!
Scroll to Top