Do you use "list" tags for lists only?

Updated by Brady Stroud [SSW] 1 year ago. See history

123
<introEmbed body={<> The HTML list tags &lt;ul&gt; and &lt;ol&gt; 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

Acknowledgements

Tiago Araujo
Related rules

Need help?

SSW Consulting has over 30 years of experience developing awesome software solutions.

We open source.Loving SSW Rules? Star us on GitHub. Star