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?
Asked
Active
Viewed 4,615 times
5 Answers
3
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>

Sebastian Brosch
- 42,106
- 15
- 72
- 87
-
2Yes. Personally, I would always prefer the CSS solution over the `type` attribute. – SVSchmidt May 29 '17 at 16:47
2
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.

Shawn Mehan
- 4,513
- 9
- 31
- 51
1
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.

Peter Grundmann
- 115
- 1
- 10
1
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

H. Figueiredo
- 888
- 9
- 18
1
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.

Shawn Mehan
- 4,513
- 9
- 31
- 51