Rules

Secret ingredients to quality software

Edit
Info

Do you use "list" tags for lists only?

Created on 02 Jul 2012 | Last updated by Dennis Heer on 10 Oct 2016 01:23 AM (over 4 years ago)

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

Tiago AraujoTiago Araujo

We open source. This page is on GitHub