Skip to content

Icons in a List

Using the power of fixed-width styling, we added some utility styling to handle HTML lists with icons used as decorative bullets.

We’ll cover the basics of how to replace default bullets with icons in unordered lists and introduce options for customizing CSS properties.

Use fa-ul and fa-li to replace default bullets in unordered lists.

  • List icons can
  • be used to
  • replace bullets
  • in lists
<ul class="fa-ul">
<li><span class="fa-li"><i class="fa-solid fa-check-square"></i></span>List icons can</li>
<li><span class="fa-li"><i class="fa-solid fa-check-square"></i></span>be used to</li>
<li><span class="fa-li"><i class="fa-solid fa-spinner fa-pulse"></i></span>replace bullets</li>
<li><span class="fa-li"><i class="fa-regular fa-square"></i></span>in lists</li>
</ul>

You can also keep the semantics of an ordered list behind the scenes but use icon bullets visually.

  1. List icons can
  2. be used to
  3. replace bullets
  4. in ordered lists also
<ol class="fa-ul">
<li><span class="fa-li"><i class="fa-solid fa-check-square"></i></span>List icons can</li>
<li><span class="fa-li"><i class="fa-solid fa-check-square"></i></span>be used to</li>
<li><span class="fa-li"><i class="fa-solid fa-spinner fa-pulse"></i></span>replace bullets</li>
<li><span class="fa-li"><i class="fa-regular fa-square"></i></span>in ordered lists also</li>
</ol>

List Classes

ClassDetails
fa-ulUsed on a <ul> or <ol> elements to style icons as list bullets
fa-liUsed on individual <li> elements to style icons as list bullets

Customization

We’ve added CSS custom properties to make customizing easier and more efficient. Define your own values for the following properties to override and customize Font Awesome’s defaults.

CSS Custom PropertyDetailsAccepted Values
--fa-li-marginSet margin around iconAny valid CSS margin value
--fa-li-widthSet width of iconAny valid CSS width value
  • List icons can
  • be used to
  • replace bullets
  • in lists
<ul class="fa-ul" style="--fa-li-width: 3em;">
<li><span class="fa-li"><i class="fa-solid fa-check-square"></i></span>List icons can</li>
<li><span class="fa-li"><i class="fa-solid fa-check-square"></i></span>be used to</li>
<li><span class="fa-li"><i class="fa-solid fa-spinner fa-pulse"></i></span>replace bullets</li>
<li><span class="fa-li" style="--fa-li-width: 4em;"><i class="fa-regular fa-square"></i></span>in lists</li>
</ul>

  • List icons can
  • be used to
  • replace bullets
  • in lists
<ul class="fa-ul" style="--fa-li-margin: 4em;">
<li><span class="fa-li"><i class="fa-solid fa-check-square"></i></span>List icons can</li>
<li><span class="fa-li"><i class="fa-solid fa-check-square"></i></span>be used to</li>
<li><span class="fa-li"><i class="fa-solid fa-spinner fa-pulse"></i></span>replace bullets</li>
<li><span class="fa-li" style="--fa-li-margin: 2em;"><i class="fa-regular fa-square"></i></span>in lists</li>
</ul>