Roman Numerals in HTML Code

Save

HTML offers webmasters a number of mechanisms for specifying lists containing one or more list elements. These lists can contain either unordered information or ordered information. Ordered lists are defined by the <ol> tag. HTML ordered lists <ol> inserts regular numbers by default. Numbers can be replaced by Roman numerals by using the "type" attribute. This involves specifying the character or Roman numeral that the list should begin with, for example "i" or "I."

HTML <ol> Tag

  • Information listed in numerical or alphabetical order are identified as HTML ordered lists. Ordered lists are created with the use of the HTML <ol> tag, and the elements are defined by the HTML <li> tag.

    HTML ordered lists contain information where order is emphasized and is defined in HTML as follows:

    <ol>

    <li>Line One</li>

    <li>Line Two</li>

    <li>Line Three</li>

    </ol>

HTML <li> Tag

  • HTML list items are defined by the <li> tag. The list items or information always appears between <li> and </li> tags. This tag is used in both ordered and unordered lists.

The 'Type' Attribute

  • The "type" attribute specifies the starting number of the first line or item of an ordered list. The starting number of a HTML ordered list usually defaults to "1." However, the value of the attribute can be changed to an integer as well as non-numeric character, including Roman numerals.

Roman Numeral HTML Ordered List Code

  • Changing the numbering to Roman numerals involves first removing the last bracket from the "<ol>" tag in the first line of the code. The type attribute should be should be inserted beside it by adding type= "i". To change the Roman numeral to upper case, then replace the "i" with "I".

    The code should therefore look like this:

    <ol type="i">

    <li>Line One</li>

    <li>Line Two</li>

    <li>Line Three</li>

    </ol>

References

  • Photo Credit Hemera Technologies/AbleStock.com/Getty Images
Promoted By Zergnet

Comments

You May Also Like

Related Searches

M
Is DIY in your DNA? Become part of our maker community.
Submit Your Work!