What is difference between UL and OL in HTML?

Recommended Answers

All 9 Replies

ul - unordered list (bulleted list)
ol - ordered list (numbered list)

Its all about Semantics. When a search engine crawls your site, you want to make sure that are using the best HTML elements that will describe the content within them.

1 - do this step first
2 - do this bit second
3 - do this step next

. buy onions
. buy potatoes
. buy milk
. buy steak

first is an ordered list, second is unordered list

With <ol> list the order is important. While with the <ul> list the order is not important. e.g.

<p>Tomorrow I will</p>
 <li>Wake up</li>
 <li>Have breakfast</li>
 <li>Go to school</li>
<p>During breakfast, I will eat</p>

I know Mr diafol. But I want to know more explanation about ol and ul.
Thank you Mr diafol.

What is the use of using ol and ul in a HTML Page

ol or ordered list will typically have numbers instead of bullet points
ul or un-ordered list will typically have bullet points

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.