Typography

list-style-type

Utilities for controlling the marker style of a list.

ClassStyles
list-disc
list-style-type: disc;
list-decimal
list-style-type: decimal;
list-none
list-style-type: none;
list-(<custom-property>)
list-style-type: var(<custom-property>);
list-[<value>]
list-style-type: <value>;

Examples

Basic example

Use utilities like list-disc and list-decimal to control the style of the markers in a list:

list-disc
  • Now this is a story all about how, my life got flipped-turned upside down
  • And I'd like to take a minute just sit right there
  • I'll tell you how I became the prince of a town called Bel-Air
list-decimal
  • Now this is a story all about how, my life got flipped-turned upside down
  • And I'd like to take a minute just sit right there
  • I'll tell you how I became the prince of a town called Bel-Air
list-none
  • Now this is a story all about how, my life got flipped-turned upside down
  • And I'd like to take a minute just sit right there
  • I'll tell you how I became the prince of a town called Bel-Air
<ul class="list-disc">  <li>Now this is a story all about how, my life got flipped-turned upside down</li>  <!-- ... --></ul><ol class="list-decimal">  <li>Now this is a story all about how, my life got flipped-turned upside down</li>  <!-- ... --></ol><ul class="list-none">  <li>Now this is a story all about how, my life got flipped-turned upside down</li>  <!-- ... --></ul>

Using a custom value

Use the list-[<value>] syntax to set the marker based on a completely custom value:

<ol class="list-[upper-roman] ...">  <!-- ... --></ol>

For CSS variables, you can also use the list-(<custom-property>) syntax:

<ol class="list-(--my-marker) ...">  <!-- ... --></ol>

This is just a shorthand for list-[var(<custom-property>)] that adds the var() function for you automatically.

Responsive design

Prefix a list-style-type utility with a breakpoint variant like md: to only apply the utility at medium screen sizes and above:

<ul class="list-none md:list-disc ...">  <!-- ... --></ul>

Learn more about using variants in the variants documentation.

Copyright © 2025 Tailwind Labs Inc.·Trademark Policy

Tailwind CSS 中文网(本网站)的目标是为中文开发者提供准确、及时的 Tailwind CSS 中文文档

Tailwind CSS 中文文档由本网站维护人员共同翻译,采用 MIT 开源协议发布

本网站与 tailwindcss.com 及 Tailwind Labs Inc. 并无从属关系

Tailwind 商标由 Tailwind Labs Inc. 所有

京ICP备15031610号-8