w3.css List

M2-R5.1 · Chapter 5: CSS Framework · 1 min read

W3.css List Class

To create a styled list, you apply the primary class, w3-ul, to an unordered list (<ul>) HTML element.

Example:

<ul class="w3-ul">
  <li>Item 1</li>

  <li>Item 2</li>

  <li>Item 3</li>

  <li>Item 4</li>

</ul>

You can enhance the appearance of the list using various modifier classes:

Class Name Description
w3-striped Displays a stripped (alternating background colors) list.
w3-bordered Adds a border across each row (list item).
w3-border Draws a border around the entire list element (<ul>).
w3-card Draws the list as a card, adding a shadow effect.
w3-round or w3-round-large Adds rounded corners to the entire list element (often used with w3-border or w3-card).