Problem Statement
Which value for the type attribute displays uppercase letters in an ordered list?
Explanation
The type attribute with value A displays uppercase letters in an ordered list. The type attribute allows you to change the numbering style of ordered lists. There are five possible values. Type equals 1 uses decimal numbers like 1, 2, 3, which is the default. Type equals A uses uppercase letters like A, B, C. Type equals a uses lowercase letters like a, b, c. Type equals I uses uppercase Roman numerals like I, II, III. Type equals i uses lowercase Roman numerals like i, ii, iii. You can also set the type attribute on individual li tags to change the style for specific items. While the type attribute works, modern best practice is to use CSS list-style-type property for more control over list styling. However, understanding the type attribute is still important for interviews and working with older code.
Code Solution
SolutionRead Only
<!-- Uppercase letters --> <ol type="A"> <li>First item</li> <li>Second item</li> <li>Third item</li> </ol> <!-- Displays: A. B. C. --> <!-- Lowercase letters --> <ol type="a"> <li>First item</li> <li>Second item</li> </ol> <!-- Displays: a. b. --> <!-- Roman numerals --> <ol type="I"> <li>Chapter One</li> <li>Chapter Two</li> </ol> <!-- Displays: I. II. --> <!-- Default numbers --> <ol type="1"> <li>Step one</li> <li>Step two</li> </ol> <!-- Displays: 1. 2. -->
Practice Sets
This question appears in the following practice sets:
