HTML List MCQs
HTML List MCQs : This section focuses on "Lists" in Html. These Multiple Choice Questions (mcq) should be practiced to improve the Html skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.
1.Which one of the following is a type of lists that HTML supports?
A. Ordered lists.
B. Unordered lists.
C. Description lists.
D. All of the above
View Answer
Explanation: All the three are types of lists in HTML.
2.By which tag, an unordered list is represented?
A. <u>
B. <I>
C. <ul>
D. <ol>
View Answer
Explanation: <ul> tag is for unordered list. <u> is for underline.
3.By which tag, an ordered list is represented?
A. <u>
B. <I>
C. <ul>
D. <ol>
View Answer
Explanation: <ol> tag is for an ordered list.
4.Below there is a HTML code.
Fill in the blanks in the above HTML code with a suitable option so as to get the list as follows when executed in a browser.
A. style="list-style-type:square;"
B. style="list-type:square;"
C. style="type:square;"
D. style= "style:square;"
View Answer
Explanation: In order to determine the type of item marker in an unordered list of HTML, list-style-type is used.
5..Fill in the blanks with a suitable option in order to number items of an ordered list with small roman numbers.
A. style= "type:i"
B. style= "list-style-type:i"
C. type= "i"
D. type= "small roman"
View Answer
Explanation: In the ordered list of HTML, type= "i" is used to number the ordered list with small roman numbers.
6.In order to start a list from 10, what attribute should be added in the opening tag of ordered list?
A. begin= "10"
B. start= "10"
C. style= "begin:10"
D. style= "start:10"
View Answer
Explanation: <ol start=10> will start numbering the items in the list from 10.
7.A HTML code is given below
Fill in the blanks with appropriate option to get the output as below:
A. <dd>,</dd>,<dt>,</dt>
B. <dt>,</dt>,<dd>,</dd>
C. <li>,</li>,<dd>,</dd>
D. <dt>,</dt>,<li>,</li>
View Answer
Explanation: This option will give the required output. Here <dt> is the description term and
is used to describe the description term.8.In order to get a list without any item marker, which one of the following can be used?
A. <ul style= "list-style-type:none;">
B. <ul list-style-type= "none">
C. <ol list-style-type= "none">
D. <ul>
View Answer
Explanation: This option will remove the item marker and will simply display the elements of the list without them.
9.What is the default start of item marker in ordered list?
A. 1
B. i
C. I
D. None of the above
View Answer
Explanation: If the ordered list is written without any attribute, e.g <ol> , the list will start from 1 by default.
10.What is the default item marker in unordered lists of HTML?
A. Circle
B. Marker
C. disc
D. None of the above
View Answer
Explanation: By default, the unordered list has disc as its item marker.
Also check :
- Html Form MCQs
- Html Headings MCQs
* You must be logged in to add comment.
HTML Unordered Lists
The HTML <ul> tag defines an unordered (bulleted) list.
HTML Ordered Lists
The HTML <ol> tag defines an ordered list. An ordered list can be numerical or alphabetical.
10 Lists
Contents
- Introduction to lists
- Unordered lists (UL), ordered lists (OL), and list items (LI)
- Definition lists: the DL, DT, and DD elements
- Visual rendering of lists
- The DIR and MENU elements
<ol>: The Ordered List element
The <ol> HTML element represents an ordered list of items — typically rendered as a numbered list.
Flow content, and if the <ol> element's children include at least one <li> element, palpable content. |
Zero or more <li>, <script> and <template> elements. |
None, both the starting and ending tag are mandatory. |
Any element that accepts flow content. |
list |
directory, group, listbox, menu, menubar, none, presentation, radiogroup, tablist, toolbar, tree |
HTMLOListElement |
How to specify the kind of marker to be used in the list in HTML5 ?
There are two types of lists in HTML, the first is an ordered list which is created using the <ol></ol> tag, and the second is an unordered list which is created using the <ul></ul> tag. Both of the lists should have a <li></li> tag to represent the data inside them.
The ordered list represents the data in a countable form. Here the marker is digits. For example:
- Item 1
- Item 2
- Item 3
The unordered list represents the data in an uncountable form. Here the marker is a disc. For example:
- Item 1
- Item 2
- Item 3
The purpose of this article is to show you how you can change the marker without using CSS.
Ordered list markers: There are five types of markers in the ordered list and the markers are specified using the type attribute.
Syntax:
<ol type="Enter type of list"></ol>Type of list Items: HTML
- type Attribute.
Type | Description |
type=”1″ | List numbered with digits (Default) |
type=”A” | List numbered with capital Alphabetic letters |
type=”a” | List numbered with small alphabetic letters |
type=”I” | List numbered with capital Roman letters |
type=”i” | List numbered with small Roman letters |
Example 1: Let’s implement ordered list attributes.
<!DOCTYPE html>
<html>
<body>
<ol>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ol>
<ol type="1">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ol>
<ol type="A">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ol>
<ol type="a">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ol>
<ol type="I">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ol>
<ol type="i">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ol>
</body>
</html>
|
Output:
Unordered list markers: There are three types of markers in the unordered list and the markers are specified using the type attribute.
Syntax:
<ul type="Enter type of list"></ul>Type of list items: HTML
- type Attribute.
Type | Description |
type=”Disc” | For displaying the disc (Default) |
type=”Circle” | For display the circle |
type=”Square” | For display the Square |
type=”Triangle” | For displaying the triangle (Do not use this, not supported by some browsers) |
Example 2: Let’s implement unordered list attributes.
<!DOCTYPE html>
<html>
<body>
<ul>
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ul>
<ul type="disc">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ul>
<ul type="circle">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ul>
<ul type="square">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ul>
<ul type="triangle">
<li>Item 1</li>
<li>Item 2</li>
<li>Item 3</li>
<li>Item 4</li>
</ul>
</body>
</html>
|
Output:
Note: Here the triangle type is not supported by the browser that’s why it is showing disc instead of a triangle.
What is the default style in ordered list?
The default list-style-type value for an ordered list is decimal , whereas the default for an unordered list is disc .
What is the default unordered list-style type in CSS?
The marker is lower-latin (a, b, c, d, e, etc.) The marker is lower-roman (i, ii, iii, iv, v, etc.) The marker is upper-alpha (A, B, C, D, E, etc.) The marker is upper-latin (A, B, C, D, E, etc.)
What is the default value for the list-style type attribute?
Property Values
list-style-type | Specifies the type of list-item marker. Default value is “disc” |
list-style-position | Specifies where to place the list-item marker. Default value is “outside” |
list-style-image | Specifies the type of list-item marker. Default value is “none” |