MCQs for Class 4: Lists in HTML

Rashmi Mishra
11 minute read
0

 

MCQs for Class 4 

Lists in HTML

  1. Which HTML tag is used to create an unordered list?
    • A) <ol>
    • B) <ul>
    • C) <dl>
    • D) <li>

Answer: B) <ul>

  1. What is the default bullet style for items in an unordered list?
    • A) Square
    • B) Circle
    • C) Disc
    • D) None

Answer: C) Disc

  1. Which HTML tag is used to create a list item?
    • A) <li>
    • B) <list>
    • C) <item>
    • D) <entry>

Answer: A) <li>

  1. How do you create a nested list in HTML?
    • A) By using the <li> tag within another <li> tag
    • B) By placing <ul> or <ol> tags inside another <ul> or <ol>
    • C) By using the <nested> tag
    • D) By adding margin to the <ul> tag

Answer: B) By placing <ul> or <ol> tags inside another <ul> or <ol>

  1. Which HTML tag is used to create an ordered list?
    • A) <ul>
    • B) <ol>
    • C) <dl>
    • D) <li>

Answer: B) <ol>

  1. What does the <dl> tag create in HTML?
    • A) Unordered list
    • B) Ordered list
    • C) Definition list
    • D) List item

Answer: C) Definition list

  1. In a definition list, which tag is used to define a term?
    • A) <dt>
    • B) <dd>
    • C) <li>
    • D) <dl>

Answer: A) <dt>

  1. In a definition list, which tag is used to provide the description or definition of a term?
    • A) <dt>
    • B) <dd>
    • C) <li>
    • D) <dl>

Answer: B) <dd>

  1. How can you change the style of list bullets in an unordered list using CSS?
    • A) By changing the list-style-type property
    • B) By changing the font-family property
    • C) By changing the text-align property
    • D) By changing the color property

Answer: A) By changing the list-style-type property

  1. What is the purpose of using the <ol type="A"> attribute?
    • A) To change the bullet style to squares
    • B) To create a definition list
    • C) To use uppercase letters for list items
    • D) To create a nested list

Answer: C) To use uppercase letters for list items

  1. Which HTML element is not used for creating lists?
    • A) <ul>
    • B) <ol>
    • C) <dl>
    • D) <p>

Answer: D) <p>

  1. What tag is used to define a list item in an ordered list?
    • A) <li>
    • B) <item>
    • C) <list-item>
    • D) <order>

Answer: A) <li>

  1. Which of the following is the correct way to create a nested list within an ordered list?
    • A) <ol><li>Parent<li><ol><li>Child</li></ol></li></ol>
    • B) <ol><li>Parent</li><ul><li>Child</li></ul></ol>
    • C) <ol><li>Parent<ul><li>Child</li></ul></li></ol>
    • D) <ol><li>Parent<ol><li>Child</li></ol></li></ol>

Answer: C) <ol><li>Parent<ul><li>Child</li></ul></li></ol>

  1. 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>

    • A) An unordered list with subitems nested within an item
    • B) An ordered list with subitems nested within an item
    • C) A definition list with subitems
    • D) An unordered list with no subitems

Answer: A) An unordered list with subitems nested within an item

  1. Which HTML tag would you use to describe a list of products and their prices?
    • A) <ul> and <li>
    • B) <ol> and <li>
    • C) <dl>, <dt>, and <dd>
    • 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?

    • A) list-style-type
    • B) type
    • C) marker
    • D) bullet

Answer: B) type

  1. How do you create a list with Roman numerals as markers?
    • A) <ol type="i">
    • B) <ol type="roman">
    • C) <ol type="I">
    • D) <ol type="R">

Answer: A) <ol type="i">

  1. Which of the following is true about the <dl> tag?
    • A) It defines an ordered list.
    • B) It defines an unordered list.
    • C) It defines a definition list.
    • D) It defines a list item.

Answer: C) It defines a definition list.

  1. In a nested list, which HTML element represents a sub-list?
    • A) <ul> or <ol> inside another <ul> or <ol>
    • B) <li> inside another <li>
    • C) <dl> inside another <dl>
    • D) <nested>

Answer: A) <ul> or <ol> inside another <ul> or <ol>

  1. Which of the following tags should be used to create a list of ingredients and their quantities?
    • A) <ul> and <li>
    • B) <dl>, <dt>, and <dd>
    • C) <ol> and <li>
    • D) <table>, <tr>, <td>

Answer: B) <dl>, <dt>, and <dd>

  1. 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>

    • A) An ordered list with nested ordered list
    • B) An unordered list with nested ordered list
    • C) A definition list with nested ordered list
    • D) An ordered list with nested unordered list

Answer: A) An ordered list with nested ordered list

  1. Which HTML element is used to group related items together in a definition list?
    • A) <dd>
    • B) <dt>
    • C) <li>
    • D) <ul>

Answer: A) <dd>

  1. How do you display an unordered list with square bullets?
    • A) Use list-style-type: square; in CSS
    • B) Use <ul type="square"> in HTML
    • C) Use <ul style="list-style-type: square;"> in HTML
    • D) Use bullet: square; in CSS

Answer: A) Use list-style-type: square; in CSS

  1. What is the default type of bullet for an unordered list in HTML?
    • A) Circle
    • B) Square
    • C) Disc
    • D) None

Answer: C) Disc

  1. In which situation would you use a definition list?
    • A) To list items in a specific order
    • B) To provide descriptions or definitions of terms
    • C) To create a bulleted list
    • D) To organize items in a numerical sequence

Answer: B) To provide descriptions or definitions of terms

  1. Which of the following list types can be used to create a checklist?
    • A) Ordered list
    • B) Unordered list with checkboxes
    • C) Definition list
    • D) None

Answer: B) Unordered list with checkboxes (typically achieved with additional HTML/CSS for checkboxes)

  1. How can you specify a different type of marker for list items in an unordered list using HTML attributes?
    • A) Use list-style-type in CSS
    • B) Use the type attribute in <ul>
    • C) Use marker-type in HTML
    • D) Use bullet-style in HTML

Answer: A) Use list-style-type in CSS

  1. Which HTML tag is used to create a list of items with a specific order?
    • A) <ul>
    • B) <ol>
    • C) <dl>
    • D) <li>

Answer: B) <ol>

  1. What is the purpose of the type attribute in an ordered list?
    • A) To specify the type of marker used for list items
    • B) To change the style of the list
    • C) To specify the type of list items (e.g., numbers, letters)
    • D) To define the description of list items

Answer: C) To specify the type of list items (e.g., numbers, letters)

  1. 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>

    • A) A nested unordered list
    • B) An unordered list with no nested items
    • C) A definition list
    • D) An ordered list

Answer: A) A nested unordered list

  1. Which attribute of the <ol> tag allows you to use uppercase Roman numerals for list items?
    • A) type="i"
    • B) type="I"
    • C) type="roman"
    • D) type="A"

Answer: B) type="I"

  1. 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>

    • A) An ordered list with uppercase letters and a nested ordered list with numbers
    • B) An unordered list with Roman numerals and a nested ordered list with letters
    • C) A definition list with sub-items
    • D) An ordered list with nested unordered list

Answer: A) An ordered list with uppercase letters and a nested ordered list with numbers

  1. Which of the following will create a nested unordered list with square bullets inside an ordered list?
    • A) <ol><li>Item 1<ul style="list-style-type: square;"><li>Subitem 1</li></ul></li></ol>
    • B) <ol><li>Item 1<ul><li>Subitem 1</li></ul></li></ol>
    • C) <ul><li>Item 1<ol><li>Subitem 1</li></ol></li></ul>
    • 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>

  1. What is the default marker type for an ordered list?
    • A) Roman numerals
    • B) Uppercase letters
    • C) Lowercase letters
    • D) Numbers

Answer: D) Numbers

  1. How can you create a list where each item has a different bullet style?
    • A) By using different CSS styles for each <li>
    • B) By using different <ul> tags with different styles
    • C) By setting the list-style-type attribute for each <li>
    • D) By using the type attribute for each <li>

Answer: A) By using different CSS styles for each <li>

  1. 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>

    • A) An unordered list with nested unordered lists
    • B) An ordered list with nested unordered lists
    • C) A definition list with nested unordered lists
    • D) An unordered list with nested ordered lists

Answer: A) An unordered list with nested unordered lists

  1. Which CSS property is used to change the marker of a list item?
    • A) list-style
    • B) marker-style
    • C) list-marker
    • D) bullet-style

Answer: A) list-style

  1. What HTML element is used to define a term in a definition list?
    • A) <dl>
    • B) <dt>
    • C) <dd>
    • D) <li>

Answer: B) <dt>

  1. Which tag should you use to include a list of authors in a book index?
    • A) <ul>
    • B) <ol>
    • C) <dl>
    • D) <li>

Answer: C) <dl>

  1. 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>

    • A) An unordered list with a nested ordered list
    • B) An ordered list with a nested unordered list
    • C) A definition list with a nested ordered list
    • D) An unordered list with nested definition list

Answer: A) An unordered list with a nested ordered list

  1. How do you create a list where items are marked with circles?
    • A) Use list-style-type: circle; in CSS
    • B) Use <ul type="circle"> in HTML
    • C) Use list-style-type: disc; in CSS
    • D) Use bullet-style: circle; in CSS

Answer: A) Use list-style-type: circle; in CSS

  1. Which HTML tag is incorrect for creating a list?
    • A) <ul>
    • B) <ol>
    • C) <dl>
    • D) <list>

Answer: D) <list>

  1. What is the purpose of using nested lists in HTML?
    • A) To create more complex and hierarchical list structures
    • B) To display images within list items
    • C) To create tables within lists
    • D) To format text within lists

Answer: A) To create more complex and hierarchical list structures

  1. Which HTML element is used to describe the description of a term in a definition list?
    • A) <dt>
    • B) <dl>
    • C) <dd>
    • D) <li>

Answer: C) <dd>

  1. How can you display a list item with no marker in CSS?
    • A) Use list-style-type: none;
    • B) Use marker-style: none;
    • C) Use list-item-style: none;
    • D) Use bullet: none;

Answer: A) Use list-style-type: none;

 



*******************************************


 

Tags

Post a Comment

0Comments

Post a Comment (0)