How specify the starting number of an ordered HTML list
- Published at
- Updated at
- Reading time
I discovered an HTML attribute that I hadn't seen before. Let me introduce you to the
value attribute. 👇
Trending Tweets often come with priceless comments. And it turned out that there are multiple ways to control the numbers of an ordered list.
Let's have a quick look!
Manuel pointed out that the
start attribute also allows you to specify the beginning of the unordered list. Ordered lists usually start at
This functionality is valuable if your listings are divided by paragraphs and additional information.
As already mentioned; if you want to control the position of a single list item, you can also use the
value attribute on a specific list item.
This functionality is valuable if you're dealing with rankings and two entries are in the same position.
And for completeness, there are also ways to control the list styles via
list-style in CSS.
It's so fascinating that HTML still holds surprises for me after writing it for over ten years!