Numbered list with roman numbers in HTML

4.9k views Asked by At

I'm working on a work file and I have to make a numbered list with roman number in html but I don't now how I can do it. Is there someone that can help me?

5

There are 5 answers

1
Sebastian Brosch On BEST ANSWER

You can use CSS to solve this using list-style-type: upper-roman;:

ul, ol {
  list-style-type: upper-roman;
}
<ul>
  <li>Test 1</li>
  <li>Test 2</li>
</ul>
<ol>
  <li>Test 1</li>
  <li>Test 2</li>
</ol>

This solution is working with <ol> and <ul> lists.


solution using HTML
You can also use HTML with an ordered list (<ol>) with the type attribute:

<ol type="I">
  <li>Test 1</li>
  <li>Test 2</li>
</ol>

0
Shawn Mehan On

You want to change the type in the ordered list tag:

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

This changes things to upper case roman numerals.

0
Peter Grundmann On

U can use css for this ol {list-style-type: upper-roman;} See https://www.w3schools.com/cssref/pr_list-style-type.asp for more informations.

0
H. Figueiredo On

I think you didn't enough research about this subject, with a quick google search I got what you were looking for. Here it is. (type="I")

Anyway, please make some research before posting questions

0
Shawn Mehan On

You want to change the type in the ordered list tag:

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

This changes things to upper case roman numerals.