Friday, April 1, 2022

HTML Ordered List Types Tutorial

 

Ordered HTML List - The Type Attribute

The type attribute of the <ol> tag, defines the type of the list item marker:

type="1"

The listitems will be numbered with numbers (default)

type="A"

The list items will be numbered with uppercase letters

type="a"

The list items will be numbered with lowercase letters

type="I"

The list items will be numbered with uppercase roman numbers

type="i"

The list items will be numbered with lowercase roman numbers

Numbers:

<ol type="1">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>


Uppercase Letters:

<ol type="A">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

Lowercase Letters:

<ol type="a">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

Uppercase Roman Numbers:

<ol type="I">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

Lowercase Roman Numbers:

<ol type="i">
  <li>Coffee</li>
  <li>Tea</li>
  <li>Milk</li>
</ol>

Control List Counting

By default, an ordered list will start counting from 1. If you want to start counting from a specified number, you can use the start attribute:

Example

<!DOCTYPE html>

<html>

<body>

 

<h2>The start attribute</h2>

<p>By default, an ordered list will start counting from 1. Use the start attribute to start counting from a specified number:</p>

 

<ol start="50">

  <li>Coffee</li>

  <li>Tea</li>

  <li>Milk</li>

</ol>

 

<ol type="I" start="50">

  <li>Coffee</li>

  <li>Tea</li>

  <li>Milk</li>

</ol>

 

</body>

</html>


No comments:

Post a Comment

Please do not enter any Link in the comment box.

Featured Post

ugb semester 2 exam form fill up and malda women's college payment

 UGB SEMESTER 2 EXAM FORM FILL UP 2022 UGB 2ND SEMESTER STUDENT LOGIN PAGE Malda Women's College STUDENT PORTAL সম্পূর্ণ ভিডিও দেখে সহজে...