Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

when to use UL or OL in html?

Tags:

html

semantics

Seems interchangable?

like image 852
omg Avatar asked Jun 24 '09 17:06

omg


People also ask

Why would we use a UL tag instead of an ol tag for a list *?

The <ul> tag is used to create an unordered list. It is used to make a list in those situations where the ordering of list items is not significant. On the other hand, the <ol> tag is to create an ordered list. As the name implies, it is used in those situations where list items are maintained order-wise.

Why do we use OL in HTML?

The <ol> HTML element represents an ordered list of items — typically rendered as a numbered list.

What is the function of UL and OL tags?

These tags are used to create lists. A list must start with either a <ul> if it is an unordered list (with bullets) or start with a <ol> if it is an ordered list (with numbers). Inside each list, every item must be start with an <li> tag.

Why do we use UL and Li in HTML?

Definition and Usage The <ul> tag defines an unordered (bulleted) list. Use the <ul> tag together with the <li> tag to create unordered lists. Tip: Use CSS to style lists. Tip: For ordered lists, use the <ol> tag.


1 Answers

UL means "unordered list". OL means "ordered list".

UL gets you bullet points. OL gets you numbers.

Definitely not interchangable.

like image 195
Randolpho Avatar answered Sep 25 '22 01:09

Randolpho