Do you use "list" tags for lists only?

Last updated by DennisHeer over 7 years ago.See history

The HTML list tags <ul> and <ol> should be used for unordered and ordered lists only .

Tip: If your list tag (<ul> or <ol>) doesn't have a list item (<li>) inside it, then it's not a list. Consider using another HTML tag (E.g. <p>).

<ul> A normal text </ul>

Figure: Bad Example - Using the <ul> for a text

<ul><li>A list item</li></ul>

<ol><li>A list item</li></ol>

Figure: Good Example - Using the <ul> and <ol> for lists

We open source. Powered by GitHub