List-style-type - CSS: Cascading Style Sheets - MDN Web Docs
Có thể bạn quan tâm
- References
- CSS
- list-style-type
- English (US)
- Remember language
- Deutsch
- Español
- Français
- 日本語
- 中文 (简体)
- Try it
- Syntax
- Accessibility
- Formal definition
- Formal syntax
- Examples
- Specifications
- Browser compatibility
- See also
- CSS
- Beginner's tutorials
- Your first website: Styling the content
- CSS styling basics
- What is CSS?
- Getting started with CSS
- Challenge: Styling a biography page
- Basic CSS selectors
- Attribute selectors
- Pseudo-classes and pseudo-elements
- Combinators
- The box model
- Handling conflicts
- CSS values and units
- Sizing items in CSS
- Backgrounds and borders
- Overflowing content
- Images, media, and form elements
- Styling tables
- Debugging CSS
- Challenge: Fundamental CSS comprehension
- Challenge: Creating fancy letterheaded paper
- Challenge: A cool-looking box
- CSS text styling
- Fundamental text and font styling
- Styling lists
- Styling links
- Web fonts
- Challenge: Typesetting a community school homepage
- CSS layout
- Introduction to CSS layout
- Floats
- Positioning
- Flexbox
- CSS grid layout
- Responsive design
- Media query fundamentals
- Challenge: Fundamental layout comprehension
- CSS reference
- Modules
- CSS anchor positioning
- CSS animations
- CSS backgrounds and borders
- CSS basic user interface
- CSS box alignment
- CSS box model
- CSS box sizing
- CSS cascade and inheritance
- CSS color adjustment
- CSS colors
- CSS compositing and blending
- CSS conditional rules
- CSS containment
- CSS counter styles
- CSS custom properties for cascading variables
- CSS display
- CSS filter effects
- CSS flexible box layout
- CSS font loading
- CSS fonts
- CSS fragmentation
- CSS generated content
- CSS grid layout
- CSS images
- CSS inline layout
- CSS lists and counters
- CSS logical properties and values
- CSS masking
- CSS media queries
- CSS motion path
- CSS multi-column layout
- CSS namespaces
- CSS nesting
- CSS overflow
- CSS overscroll behavior
- CSS paged media
- CSS positioned layout
- CSS properties and values API
- CSS pseudo-elements
- CSS ruby layout
- CSS scoping
- CSS scroll snap
- CSS scroll-driven animations
- CSS scrollbars styling
- CSS selectors
- CSS shadow parts
- CSS shapes
- CSS syntax
- CSS table
- CSS text
- CSS text decoration
- CSS transforms
- CSS transitions
- CSS view transitions
- CSS writing modes
- CSSOM view
- Properties
- -moz-*
- -moz-float-edge Non-standard Deprecated
- -moz-force-broken-image-icon Non-standard Deprecated
- -moz-image-region Non-standard
- -moz-orient Non-standard
- -moz-user-focus Non-standard Deprecated
- -moz-user-input Non-standard Deprecated
- -webkit-*
- -webkit-border-before Non-standard
- -webkit-box-reflect Non-standard
- -webkit-line-clamp
- -webkit-mask-box-image Non-standard
- -webkit-mask-composite Non-standard
- -webkit-mask-position-x Non-standard
- -webkit-mask-position-y Non-standard
- -webkit-mask-repeat-x Non-standard
- -webkit-mask-repeat-y Non-standard
- -webkit-tap-highlight-color Non-standard
- -webkit-text-fill-color
- -webkit-text-security Non-standard
- -webkit-text-stroke
- -webkit-text-stroke-color
- -webkit-text-stroke-width
- -webkit-touch-callout Non-standard
- accent-color
- align-*
- align-content
- align-items
- align-self
- all
- anchor-name Experimental
- animation-*
- animation
- animation-composition
- animation-delay
- animation-direction
- animation-duration
- animation-fill-mode
- animation-iteration-count
- animation-name
- animation-play-state
- animation-range Experimental
- animation-range-end Experimental
- animation-range-start Experimental
- animation-timeline Experimental
- animation-timing-function
- appearance
- aspect-ratio
- backdrop-filter
- backface-visibility
- background-*
- background
- background-attachment
- background-blend-mode
- background-clip
- background-color
- background-image
- background-origin
- background-position
- background-position-x
- background-position-y
- background-repeat
- background-size
- block-size
- border-*
- border
- border-block
- border-block-color
- border-block-end
- border-block-end-color
- border-block-end-style
- border-block-end-width
- border-block-start
- border-block-start-color
- border-block-start-style
- border-block-start-width
- border-block-style
- border-block-width
- border-bottom
- border-bottom-color
- border-bottom-left-radius
- border-bottom-right-radius
- border-bottom-style
- border-bottom-width
- border-collapse
- border-color
- border-end-end-radius
- border-end-start-radius
- border-image
- border-image-outset
- border-image-repeat
- border-image-slice
- border-image-source
- border-image-width
- border-inline
- border-inline-color
- border-inline-end
- border-inline-end-color
- border-inline-end-style
- border-inline-end-width
- border-inline-start
- border-inline-start-color
- border-inline-start-style
- border-inline-start-width
- border-inline-style
- border-inline-width
- border-left
- border-left-color
- border-left-style
- border-left-width
- border-radius
- border-right
- border-right-color
- border-right-style
- border-right-width
- border-spacing
- border-start-end-radius
- border-start-start-radius
- border-style
- border-top
- border-top-color
- border-top-left-radius
- border-top-right-radius
- border-top-style
- border-top-width
- border-width
- bottom
- box-*
- box-align Non-standard Deprecated
- box-decoration-break
- box-direction Non-standard Deprecated
- box-flex Non-standard Deprecated
- box-flex-group Non-standard Deprecated
- box-lines Non-standard Deprecated
- box-ordinal-group Non-standard Deprecated
- box-orient Non-standard Deprecated
- box-pack Non-standard Deprecated
- box-shadow
- box-sizing
- break-*
- break-after
- break-before
- break-inside
- caption-side
- caret-color
- clear
- clip-*
- clip Deprecated
- clip-path
- clip-rule
- color-*
- color
- color-interpolation
- color-interpolation-filters
- color-scheme
- column-*
- column-count
- column-fill
- column-gap
- column-rule
- column-rule-color
- column-rule-style
- column-rule-width
- column-span
- column-width
- columns
- contain-*
- contain
- contain-intrinsic-block-size
- contain-intrinsic-height
- contain-intrinsic-inline-size
- contain-intrinsic-size
- contain-intrinsic-width
- container-*
- container
- container-name
- container-type
- content
- content-visibility
- counter-*
- counter-increment
- counter-reset
- counter-set
- cursor
- cx
- cy
- d
- direction
- display
- dominant-baseline
- empty-cells
- field-sizing Experimental
- fill-*
- fill
- fill-opacity
- fill-rule
- filter
- flex-*
- flex
- flex-basis
- flex-direction
- flex-flow
- flex-grow
- flex-shrink
- flex-wrap
- float
- flood-color
- flood-opacity
- font-*
- font
- font-family
- font-feature-settings
- font-kerning
- font-language-override
- font-optical-sizing
- font-palette
- font-size
- font-size-adjust
- font-smooth Non-standard
- font-stretch
- font-style
- font-synthesis
- font-synthesis-position Experimental
- font-synthesis-small-caps
- font-synthesis-style
- font-synthesis-weight
- font-variant
- font-variant-alternates
- font-variant-caps
- font-variant-east-asian
- font-variant-emoji
- font-variant-ligatures
- font-variant-numeric
- font-variant-position
- font-variation-settings
- font-weight
- forced-color-adjust
- gap
- grid-*
- grid
- grid-area
- grid-auto-columns
- grid-auto-flow
- grid-auto-rows
- grid-column
- grid-column-end
- grid-column-start
- grid-row
- grid-row-end
- grid-row-start
- grid-template
- grid-template-areas
- grid-template-columns
- grid-template-rows
- hanging-punctuation
- height
- hyphenate-character
- hyphenate-limit-chars
- hyphens
- image-*
- image-orientation
- image-rendering
- image-resolution Experimental
- initial-letter
- inline-size
- inset-*
- inset
- inset-block
- inset-block-end
- inset-block-start
- inset-inline
- inset-inline-end
- inset-inline-start
- interpolate-size Experimental
- isolation
- justify-*
- justify-content
- justify-items
- justify-self
- left
- letter-spacing
- lighting-color
- line-*
- line-break
- line-height
- line-height-step Experimental
- list-*
- list-style
- list-style-image
- list-style-position
- list-style-type
- margin-*
- margin
- margin-block
- margin-block-end
- margin-block-start
- margin-bottom
- margin-inline
- margin-inline-end
- margin-inline-start
- margin-left
- margin-right
- margin-top
- margin-trim Experimental
- marker-*
- marker
- marker-end
- marker-mid
- marker-start
- mask-*
- mask
- mask-border
- mask-border-mode
- mask-border-outset
- mask-border-repeat
- mask-border-slice
- mask-border-source
- mask-border-width
- mask-clip
- mask-composite
- mask-image
- mask-mode
- mask-origin
- mask-position
- mask-repeat
- mask-size
- mask-type
- math-*
- math-depth
- math-shift Experimental
- math-style
- max-*
- max-block-size
- max-height
- max-inline-size
- max-width
- min-*
- min-block-size
- min-height
- min-inline-size
- min-width
- mix-blend-mode
- object-fit
- object-position
- offset-*
- offset
- offset-anchor
- offset-distance
- offset-path
- offset-position
- offset-rotate
- opacity
- order
- orphans
- outline-*
- outline
- outline-color
- outline-offset
- outline-style
- outline-width
- overflow-*
- overflow
- overflow-anchor
- overflow-block
- overflow-clip-margin
- overflow-inline
- overflow-wrap
- overflow-x
- overflow-y
- overlay Experimental
- overscroll-*
- overscroll-behavior
- overscroll-behavior-block
- overscroll-behavior-inline
- overscroll-behavior-x
- overscroll-behavior-y
- padding-*
- padding
- padding-block
- padding-block-end
- padding-block-start
- padding-bottom
- padding-inline
- padding-inline-end
- padding-inline-start
- padding-left
- padding-right
- padding-top
- page-*
- page
- page-break-after
- page-break-before
- page-break-inside
- paint-order
- perspective
- perspective-origin
- place-*
- place-content
- place-items
- place-self
- pointer-events
- position-*
- position
- position-anchor Experimental
- position-area Experimental
- position-try Experimental
- position-try-fallbacks Experimental
- position-try-order Experimental
- position-visibility Experimental
- print-color-adjust
- quotes
- r
- resize
- right
- rotate
- row-gap
- ruby-align
- ruby-position
- rx
- ry
- scale
- scroll-*
- scroll-behavior
- scroll-margin
- scroll-margin-block
- scroll-margin-block-end
- scroll-margin-block-start
- scroll-margin-bottom
- scroll-margin-inline
- scroll-margin-inline-end
- scroll-margin-inline-start
- scroll-margin-left
- scroll-margin-right
- scroll-margin-top
- scroll-padding
- scroll-padding-block
- scroll-padding-block-end
- scroll-padding-block-start
- scroll-padding-bottom
- scroll-padding-inline
- scroll-padding-inline-end
- scroll-padding-inline-start
- scroll-padding-left
- scroll-padding-right
- scroll-padding-top
- scroll-snap-align
- scroll-snap-stop
- scroll-snap-type
- scroll-timeline Experimental
- scroll-timeline-axis Experimental
- scroll-timeline-name Experimental
- scrollbar-*
- scrollbar-color
- scrollbar-gutter
- scrollbar-width
- shape-*
- shape-image-threshold
- shape-margin
- shape-outside
- shape-rendering
- stop-color
- stop-opacity
- stroke-*
- stroke
- stroke-dasharray
- stroke-dashoffset
- stroke-linecap
- stroke-linejoin
- stroke-miterlimit
- stroke-opacity
- stroke-width
- tab-size
- table-layout
- text-*
- text-align
- text-align-last
- text-anchor
- text-combine-upright
- text-decoration
- text-decoration-color
- text-decoration-line
- text-decoration-skip Experimental
- text-decoration-skip-ink
- text-decoration-style
- text-decoration-thickness
- text-emphasis
- text-emphasis-color
- text-emphasis-position
- text-emphasis-style
- text-indent
- text-justify
- text-orientation
- text-overflow
- text-rendering
- text-shadow
- text-size-adjust Experimental
- text-spacing-trim Experimental
- text-transform
- text-underline-offset
- text-underline-position
- text-wrap
- text-wrap-mode
- text-wrap-style
- timeline-scope Experimental
- top
- touch-action
- transform-*
- transform
- transform-box
- transform-origin
- transform-style
- transition-*
- transition
- transition-behavior
- transition-delay
- transition-duration
- transition-property
- transition-timing-function
- translate
- unicode-bidi
- user-modify Non-standard Deprecated
- user-select
- vector-effect
- vertical-align
- view-*
- view-timeline Experimental
- view-timeline-axis Experimental
- view-timeline-inset Experimental
- view-timeline-name Experimental
- view-transition-name
- visibility
- white-space
- white-space-collapse
- widows
- width
- will-change
- word-break
- word-spacing
- writing-mode
- x
- y
- z-index
- zoom
- -moz-*
- Selectors
- & nesting selector
- Attribute selectors
- Class selectors
- ID selectors
- Type selectors
- Universal selectors
- Combinators
- Child combinator
- Column combinator Experimental
- Descendant combinator
- Namespace separator
- Next-sibling combinator
- Selector list
- Subsequent-sibling combinator
- Pseudo-classes
- :-moz-broken Non-standard Deprecated
- :-moz-drag-over Non-standard
- :-moz-first-node Experimental Non-standard
- :-moz-handler-blocked Non-standard
- :-moz-handler-crashed Non-standard
- :-moz-handler-disabled Non-standard
- :-moz-last-node Experimental Non-standard
- :-moz-loading Non-standard
- :-moz-locale-dir(ltr) Non-standard
- :-moz-locale-dir(rtl) Non-standard
- :-moz-only-whitespace Non-standard
- :-moz-submit-invalid Non-standard
- :-moz-suppressed Non-standard
- :-moz-user-disabled Non-standard
- :-moz-window-inactive Non-standard
- :active
- :any-link
- :autofill
- :blank Experimental
- :buffering
- :checked
- :current Experimental
- :default
- :defined
- :dir()
- :disabled
- :empty
- :enabled
- :first
- :first-child
- :first-of-type
- :focus
- :focus-visible
- :focus-within
- :fullscreen
- :future
- :has-slotted Experimental
- :has()
- :host
- :host-context()
- :host()
- :hover
- :in-range
- :indeterminate
- :invalid
- :is()
- :lang()
- :last-child
- :last-of-type
- :left
- :link
- :local-link Experimental
- :modal
- :muted
- :not()
- :nth-child()
- :nth-last-child()
- :nth-last-of-type()
- :nth-of-type()
- :only-child
- :only-of-type
- :optional
- :out-of-range
- :past
- :paused
- :picture-in-picture
- :placeholder-shown
- :playing
- :popover-open
- :read-only
- :read-write
- :required
- :right
- :root
- :scope
- :seeking
- :stalled
- :state()
- :target
- :target-within Experimental
- :user-invalid
- :user-valid
- :valid
- :visited
- :volume-locked
- :where()
- Pseudo-elements
- ::-moz-color-swatch Non-standard
- ::-moz-focus-inner Experimental Non-standard
- ::-moz-list-bullet Experimental Non-standard
- ::-moz-list-number Experimental Non-standard
- ::-moz-meter-bar Non-standard
- ::-moz-progress-bar Experimental Non-standard
- ::-moz-range-progress Non-standard
- ::-moz-range-thumb Non-standard
- ::-moz-range-track Non-standard
- ::-webkit-inner-spin-button Non-standard
- ::-webkit-meter-bar Non-standard Deprecated
- ::-webkit-meter-even-less-good-value Non-standard
- ::-webkit-meter-inner-element Non-standard
- ::-webkit-meter-optimum-value Non-standard
- ::-webkit-meter-suboptimum-value Non-standard
- ::-webkit-progress-bar Non-standard
- ::-webkit-progress-inner-element Non-standard
- ::-webkit-progress-value Non-standard
- ::-webkit-scrollbar Non-standard
- ::-webkit-search-cancel-button Non-standard
- ::-webkit-search-results-button Non-standard
- ::-webkit-slider-runnable-track Experimental Non-standard
- ::-webkit-slider-thumb Experimental Non-standard
- ::after
- ::backdrop
- ::before
- ::cue
- ::file-selector-button
- ::first-letter
- ::first-line
- ::grammar-error
- ::highlight()
- ::marker
- ::part()
- ::placeholder
- ::selection
- ::slotted()
- ::spelling-error
- ::target-text
- ::view-transition
- ::view-transition-group
- ::view-transition-image-pair
- ::view-transition-new
- ::view-transition-old
- At-rules
- @charset
- @color-profile
- @container
- @counter-style
- @document Non-standard Deprecated
- @font-face
- @font-feature-values
- @font-palette-values
- @import
- @keyframes
- @layer
- @media
- @namespace
- @page
- @position-try Experimental
- @property
- @scope
- @starting-style
- @supports
- @view-transition
- Functions
- -moz-image-rect Non-standard Deprecated
- abs()
- acos()
- anchor-size() Experimental
- anchor() Experimental
- asin()
- atan()
- atan2()
- attr()
- calc-size() Experimental
- calc()
- clamp()
- cos()
- counter()
- counters()
- cross-fade()
- element() Experimental
- env()
- exp()
- fit-content()
- hypot()
- log()
- max()
- min()
- minmax()
- mod()
- pow()
- ray()
- rem()
- repeat()
- round()
- sign()
- sin()
- sqrt()
- symbols()
- tan()
- url()
- var()
- Types
- <absolute-size>
- <alpha-value>
- <angle-percentage>
- <angle>
- <basic-shape>
- <blend-mode>
- <box-edge>
- <calc-keyword>
- <calc-sum>
- <color-interpolation-method>
- <color>
- <custom-ident>
- <dashed-ident>
- <dimension>
- <display-box>
- <display-inside>
- <display-internal>
- <display-legacy>
- <display-listitem>
- <display-outside>
- <easing-function>
- <filter-function>
- <flex>
- <frequency-percentage>
- <frequency>
- <generic-family>
- <gradient>
- <hex-color>
- <hue-interpolation-method>
- <hue>
- <ident>
- <image>
- <integer>
- <length-percentage>
- <length>
- <line-style>
- <named-color>
- <number>
- <overflow>
- <percentage>
- <position-area> Experimental
- <position>
- <ratio>
- <relative-size>
- <resolution>
- <shape> Deprecated
- <string>
- <system-color>
- <time-percentage>
- <time>
- <transform-function>
- <url>
- Guides
- Animations
- Using CSS animations
- Backgrounds and Borders
- Using multiple backgrounds
- Resizing background images
- Box alignment
- Box alignment in block layout
- Box alignment in flexbox
- Box alignment in grid layout
- Box alignment in multi-column layout
- Box model
- Introduction to the CSS basic box model
- Mastering margin collapsing
- Colors
- Applying_color_to_HTML_elements
- Color values
- Using relative colors
- Using color wisely
- Accessibility_Understanding_colors_and_luminance"
- Accessibility: Color contrast
- Columns
- Basic concepts of multi-column layout
- Styling columns
- Spanning and balancing columns
- Handling overflow in multi-column layout
- Handling content breaks in multi-column layout
- Conditional rules
- Using feature queries
- Containment
- Using CSS containment
- CSS container queries
- Using container size and style queries
- CSSOM view
- Coordinate systems
- Flexbox
- Basic concepts of flexbox
- Relationship of flexbox to other layout methods
- Aligning items in a flex container
- Ordering flex items
- Controlling ratios of flex items along the main axis
- Mastering wrapping of flex items
- Typical use cases of flexbox
- Flow layout
- Block and inline layout in normal flow
- In flow and out of flow
- Introduction to formatting contexts
- Flow layout and writing modes
- Flow layout and overflow
- Fonts
- OpenType font features guide
- Variable fonts guide
- Grid
- Basic concepts of grid layout
- Relationship of grid layout to other layout methods
- Grid layout using line-based placement
- Grid template areas
- Layout using named grid lines
- Auto-placement in grid layout
- Box alignment in grid layout
- Grids, logical values, and writing modes
- Grid layout and accessibility
- CSS grid layout and progressive enhancement
- Realizing common layouts using grids
- Subgrid
- Masonry layout Experimental
- Images
- Using CSS gradients
- Lists and counters
- Using CSS counters
- Consistent list indentation
- Logical properties
- Basic concepts of logical properties and values
- Logical properties for floating and positioning
- Logical properties for margins, borders, and padding
- Logical properties for sizing
- Math functions
- Using CSS math functions
- Media queries
- Using media queries
- Using media queries for accessibility
- Testing media queries programmatically
- Printing
- Nesting style rules
- Using CSS nesting
- CSS nesting at-rules
- CSS nesting and specificity
- Positioning
- Understanding z-index
- Scroll snap
- Basic concepts of scroll snap
- Shapes
- Overview of shapes
- Shapes from box values
- Basic shapes with shape-outside
- Shapes from images
- Text
- Wrapping and breaking text
- Transforms
- Using CSS transforms
- Transitions
- Using CSS transitions
- CSS Layout cookbook
- Recipe: Media objects
- Column layouts
- Center an element
- Sticky footers
- Split navigation
- Breadcrumb navigation
- List group with badges
- Pagination
- Card
- Grid wrapper
- Tools
- Color picker tool
- Box-shadow generator
- Border-image generator
- Border-radius generator
- Try it
- Syntax
- Accessibility
- Formal definition
- Formal syntax
- Examples
- Specifications
- Browser compatibility
- See also
The list-style-type CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element.
Try it
The marker will be currentcolor, the same as the computed color of the element it applies to.
Only a few elements (<li> and <summary>) have a default value of display: list-item. However, the list-style-type property may be applied to any element whose display value is set to list-item. Moreover, because this property is inherited, it can be set on a parent element (commonly <ol> or <ul>) to make it apply to all list items.
Syntax
css/* Partial list of types */ list-style-type: disc; list-style-type: circle; list-style-type: square; list-style-type: decimal; list-style-type: georgian; list-style-type: trad-chinese-informal; list-style-type: kannada; /* <string> value */ list-style-type: "-"; /* Identifier matching an @counter-style rule */ list-style-type: custom-counter-style; /* Keyword value */ list-style-type: none; /* Global values */ list-style-type: inherit; list-style-type: initial; list-style-type: revert; list-style-type: revert-layer; list-style-type: unset;The list-style-type property may be defined as any one of:
- a <custom-ident> value,
- a symbols() value,
- a <string> value, or
- the keyword none.
Note that:
- Some types require a suitable font installed to display as expected.
- The cjk-ideographic is identical to trad-chinese-informal; it exists for legacy reasons.
Values
<custom-ident>An identifier matching the value of a @counter-style or one of the predefined styles:
symbols()Defines an anonymous style of the list.
<string>The specified string will be used as the item's marker.
noneNo item marker is shown.
discA filled circle (default value).
circleA hollow circle.
squareA filled square.
decimalDecimal numbers, beginning with 1.
cjk-decimalHan decimal numbers.
decimal-leading-zeroDecimal numbers, padded by initial zeros.
lower-romanLowercase roman numerals.
upper-romanUppercase roman numerals.
lower-greekLowercase classical Greek.
lower-alpha, lower-latinLowercase ASCII letters.
upper-alpha, upper-latinUppercase ASCII letters.
arabic-indic, -moz-arabic-indicArabic-Indic numbers.
armenianTraditional Armenian numbering.
bengali, -moz-bengaliBengali numbering.
cambodian/khmerCambodian/Khmer numbering.
cjk-earthly-branch, -moz-cjk-earthly-branchHan "Earthly Branch" ordinals.
cjk-heavenly-stem, -moz-cjk-heavenly-stemHan "Heavenly Stem" ordinals.
cjk-ideographicIdentical to trad-chinese-informal.
devanagari, -moz-devanagariDevanagari numbering.
ethiopic-numericEthiopic numbering.
georgianTraditional Georgian numbering.
gujarati, -moz-gujaratiGujarati numbering.
gurmukhi, -moz-gurmukhiGurmukhi numbering.
hebrewTraditional Hebrew numbering.
hiraganaDictionary-order hiragana lettering.
hiragana-irohaIroha-order hiragana lettering.
japanese-formalJapanese formal numbering to be used in legal or financial documents. The kanjis are designed so that they can't be modified to look like another correct one.
japanese-informalJapanese informal numbering.
kannada, -moz-kannadaKannada numbering.
katakanaDictionary-order katakana lettering.
katakana-irohaIroha-order katakana lettering.
korean-hangul-formalKorean hangul numbering.
korean-hanja-formalFormal Korean Han numbering.
korean-hanja-informalKorean hanja numbering.
lao, -moz-laoLaotian numbering.
lower-armenianLowercase Armenian numbering.
malayalam, -moz-malayalamMalayalam numbering.
mongolianMongolian numbering.
myanmar, -moz-myanmarMyanmar (Burmese) numbering.
oriya, -moz-oriyaOriya numbering.
persian, -moz-persianPersian numbering.
simp-chinese-formalSimplified Chinese formal numbering.
simp-chinese-informalSimplified Chinese informal numbering.
tamil, -moz-tamilTamil numbering.
telugu, -moz-teluguTelugu numbering.
thai, -moz-thaiThai numbering.
tibetanTibetan numbering.
trad-chinese-formalTraditional Chinese formal numbering.
trad-chinese-informalTraditional Chinese informal numbering.
upper-armenianTraditional uppercase Armenian numbering.
disclosure-openSymbol indicating that a disclosure widget such as <details> is opened.
disclosure-closedSymbol indicating that a disclosure widget, like <details> is closed.
Refer to the All list style types example to see the above values in action. Details of all the available counter styles used by various cultures around the world can be found in Ready-made Counter Styles.
Non-standard extensions
A few predefined types are supported by Mozilla (Firefox) with a -moz- prefix.
- ethiopic-halehame: -moz-ethiopic-halehame
- ethiopic-halehame-am: -moz-ethiopic-halehame-am
- ethiopic-halehame-ti-er: -moz-ethiopic-halehame-ti-er
- ethiopic-halehame-ti-et: -moz-ethiopic-halehame-ti-et
- ethiopic-numeric: -moz-ethiopic-numeric
- hangul: -moz-hangul
- hangul-consonant: -moz-hangul-consonant
- urdu: -moz-urdu
See the compatibility table to check which browsers support which extension.
Accessibility
Safari will not recognize an ordered or unordered list as a list in the accessibility tree if it has a list-style-type value of none. This can be resolved by adding role="list" to the list's opening tag. To learn more about this and potential workarounds, see list-style.
Formal definition
Initial value | disc |
---|---|
Applies to | list items |
Inherited | yes |
Computed value | as specified |
Animation type | discrete |
Formal syntax
list-style-type = <counter-style> | <string> | none <counter-style> = <counter-style-name> | <symbols()> <symbols()> = symbols( <symbols-type>? [ <string> | <image> ]+ ) <symbols-type> = cyclic | numeric | alphabetic | symbolic | fixed <image> = <url> | <gradient> <url> = <url()> | <src()> <url()> = url( <string> <url-modifier>* ) | <url-token> <src()> = src( <string> <url-modifier>* )Examples
Setting list item markers
HTML
htmlList 1 <ol class="normal"> <li>Hello</li> <li>World</li> <li>What's up?</li> </ol> List 2 <ol class="shortcut"> <li>Looks</li> <li>Like</li> <li>The</li> <li>Same</li> </ol>CSS
cssol.normal { list-style-type: upper-alpha; } /* or use the shortcut "list-style": */ ol.shortcut { list-style: upper-alpha; }Result
All list style types
HTML
html<ol> <li>Apollo</li> <li>Hubble</li> <li>Chandra</li> <li>Cassini-Huygens</li> <li>Spitzer</li> </ol> <h2>Choose a list style type:</h2> <div class="container"> <label for="disc"> <input type="radio" id="disc" name="type" value="disc" />disc </label> <label for="circle"> <input type="radio" id="circle" name="type" value="circle" />circle </label> <label for="square"> <input type="radio" id="square" name="type" value="square" />square </label> <label for="decimal"> <input type="radio" id="decimal" name="type" value="decimal" />decimal </label> <label for="cjk-decimal"> <input type="radio" id="cjk-decimal" name="type" value="cjk-decimal" />cjk-decimal </label> <label for="decimal-leading-zero"> <input type="radio" id="decimal-leading-zero" name="type" value="decimal-leading-zero" />decimal-leading-zero </label> <label for="lower-roman"> <input type="radio" id="lower-roman" name="type" value="lower-roman" />lower-roman </label> <label for="upper-roman"> <input type="radio" id="upper-roman" name="type" value="upper-roman" />upper-roman </label> <label for="lower-greek"> <input type="radio" id="lower-greek" name="type" value="lower-greek" />lower-greek </label> <label for="lower-alpha"> <input type="radio" id="lower-alpha" name="type" value="lower-alpha" />lower-alpha, lower-latin </label> <label for="upper-alpha"> <input type="radio" id="upper-alpha" name="type" value="upper-alpha" />upper-alpha, upper-latin </label> <label for="arabic-indic"> <input type="radio" id="arabic-indic" name="type" value="arabic-indic" />arabic-indic </label> <label for="armenian"> <input type="radio" id="armenian" name="type" value="armenian" />armenian </label> <label for="bengali"> <input type="radio" id="bengali" name="type" value="bengali" />bengali </label> <label for="cambodian"> <input type="radio" id="cambodian" name="type" value="cambodian" />cambodian </label> <label for="cjk-earthly-branch"> <input type="radio" id="cjk-earthly-branch" name="type" value="cjk-earthly-branch" />cjk-earthly-branch </label> <label for="cjk-heavenly-stem"> <input type="radio" id="cjk-heavenly-stem" name="type" value="cjk-heavenly-stem" />cjk-heavenly-stem </label> <label for="cjk-ideographic"> <input type="radio" id="cjk-ideographic" name="type" value="cjk-ideographic" />cjk-ideographic </label> <label for="devanagari"> <input type="radio" id="devanagari" name="type" value="devanagari" />devanagari </label> <label for="ethiopic-numeric"> <input type="radio" id="ethiopic-numeric" name="type" value="ethiopic-numeric" />ethiopic-numeric </label> <label for="georgian"> <input type="radio" id="georgian" name="type" value="georgian" />georgian </label> <label for="gujarati"> <input type="radio" id="gujarati" name="type" value="gujarati" />gujarati </label> <label for="gurmukhi"> <input type="radio" id="gurmukhi" name="type" value="gurmukhi" />gurmukhi </label> <label for="hebrew"> <input type="radio" id="hebrew" name="type" value="hebrew" />hebrew </label> <label for="hiragana"> <input type="radio" id="hiragana" name="type" value="hiragana" />hiragana </label> <label for="hiragana-iroha"> <input type="radio" id="hiragana-iroha" name="type" value="hiragana-iroha" />hiragana-iroha </label> <label for="japanese-formal"> <input type="radio" id="japanese-formal" name="type" value="japanese-formal" />japanese-formal </label> <label for="japanese-informal"> <input type="radio" id="japanese-informal" name="type" value="japanese-informal" />japanese-informal </label> <label for="kannada"> <input type="radio" id="kannada" name="type" value="kannada" />kannada </label> <label for="katakana"> <input type="radio" id="katakana" name="type" value="katakana" />katakana </label> <label for="katakana-iroha"> <input type="radio" id="katakana-iroha" name="type" value="katakana-iroha" />katakana-iroha </label> <label for="khmer"> <input type="radio" id="khmer" name="type" value="khmer" />khmer </label> <label for="korean-hangul-formal"> <input type="radio" id="korean-hangul-formal" name="type" value="korean-hangul-formal" />korean-hangul-formal </label> <label for="korean-hanja-formal"> <input type="radio" id="korean-hanja-formal" name="type" value="korean-hanja-formal" />korean-hanja-formal </label> <label for="korean-hanja-informal"> <input type="radio" id="korean-hanja-informal" name="type" value="korean-hanja-informal" />korean-hanja-informal </label> <label for="lao"> <input type="radio" id="lao" name="type" value="lao" />lao </label> <label for="lower-armenian"> <input type="radio" id="lower-armenian" name="type" value="lower-armenian" />lower-armenian </label> <label for="malayalam"> <input type="radio" id="malayalam" name="type" value="malayalam" />malayalam </label> <label for="mongolian"> <input type="radio" id="mongolian" name="type" value="mongolian" />mongolian </label> <label for="myanmar"> <input type="radio" id="myanmar" name="type" value="myanmar" />myanmar </label> <label for="oriya"> <input type="radio" id="oriya" name="type" value="oriya" />oriya </label> <label for="persian"> <input type="radio" id="persian" name="type" value="persian" />persian </label> <label for="simp-chinese-formal"> <input type="radio" id="simp-chinese-formal" name="type" value="simp-chinese-formal" />simp-chinese-formal </label> <label for="simp-chinese-informal"> <input type="radio" id="simp-chinese-informal" name="type" value="simp-chinese-informal" />simp-chinese-informal </label> <label for="tamil"> <input type="radio" id="tamil" name="type" value="tamil" />tamil </label> <label for="telugu"> <input type="radio" id="telugu" name="type" value="telugu" />telugu </label> <label for="thai"> <input type="radio" id="thai" name="type" value="thai" />thai </label> <label for="tibetan"> <input type="radio" id="tibetan" name="type" value="tibetan" />tibetan </label> <label for="trad-chinese-formal"> <input type="radio" id="trad-chinese-formal" name="type" value="trad-chinese-formal" />trad-chinese-formal </label> <label for="trad-chinese-informal"> <input type="radio" id="trad-chinese-informal" name="type" value="trad-chinese-informal" />trad-chinese-informal </label> <label for="upper-armenian"> <input type="radio" id="upper-armenian" name="type" value="upper-armenian" />upper-armenian </label> <label for="disclosure-open"> <input type="radio" id="disclosure-open" name="type" value="disclosure-open" />disclosure-open </label> <label for="disclosure-closed"> <input type="radio" id="disclosure-closed" name="type" value="disclosure-closed" />disclosure-closed </label> <label for="-moz-ethiopic-halehame"> <input type="radio" id="-moz-ethiopic-halehame" name="type" value="-moz-ethiopic-halehame" />-moz-ethiopic-halehame </label> <label for="-moz-ethiopic-halehame-am"> <input type="radio" id="-moz-ethiopic-halehame-am" name="type" value="-moz-ethiopic-halehame-am" />-moz-ethiopic-halehame-am </label> <label for="ethiopic-halehame-ti-er"> <input type="radio" id="ethiopic-halehame-ti-er" name="type" value="ethiopic-halehame-ti-er" />ethiopic-halehame-ti-er </label> <label for="ethiopic-halehame-ti-et"> <input type="radio" id="ethiopic-halehame-ti-et" name="type" value="ethiopic-halehame-ti-et" />ethiopic-halehame-ti-et </label> <label for="hangul"> <input type="radio" id="hangul" name="type" value="hangul" />hangul </label> <label for="hangul-consonant"> <input type="radio" id="hangul-consonant" name="type" value="hangul-consonant" />hangul-consonant </label> <label for="urdu"> <input type="radio" id="urdu" name="type" value="urdu" />urdu </label> <label for="-moz-ethiopic-halehame-ti-er"> <input type="radio" id="-moz-ethiopic-halehame-ti-er" name="type" value="-moz-ethiopic-halehame-ti-er" />-moz-ethiopic-halehame-ti-er </label> <label for="-moz-ethiopic-halehame-ti-et"> <input type="radio" id="-moz-ethiopic-halehame-ti-et" name="type" value="-moz-ethiopic-halehame-ti-et" />-moz-ethiopic-halehame-ti-et </label> <label for="-moz-hangul"> <input type="radio" id="-moz-hangul" name="type" value="-moz-hangul" />-moz-hangul </label> <label for="-moz-hangul-consonant"> <input type="radio" id="-moz-hangul-consonant" name="type" value="-moz-hangul-consonant" />-moz-hangul-consonant </label> <label for="-moz-urdu"> <input type="radio" id="-moz-urdu" name="type" value="-moz-urdu" />-moz-urdu </label> </div>CSS
cssol { font-size: 1.2rem; } .container { column-count: 3; } label { display: block; } input { margin: 0.4rem; }JavaScript
jsconst container = document.querySelector(".container"); const list = document.querySelector("ol"); container.addEventListener("change", (event) => { list.setAttribute("style", `list-style-type: ${event.target.value}`); });Result
We're not limited to the list style types defined on this page or the specification. The @counter-style at-rule enables creating counters using any alphabet.
Specifications
Specification |
---|
CSS Lists and Counters Module Level 3 # text-markers |
CSS Counter Styles Level 3 # extending-css2 |
Browser compatibility
BCD tables only load in the browser
See also
- list-style shorthand property
- list-style-image property
- list-style-position property
- ::marker pseudo-element
- CSS lists and counters module
- CSS counter styles module
Help improve MDN
Was this page helpful to you?YesNoLearn how to contribute.This page was last modified on Sep 28, 2024 by MDN contributors.
View this page on GitHub • Report a problem with this contentTừ khóa » Html List Style Tick
-
Css - How To Use Tick / Checkmark Symbol (✓) Instead Of Bullets In ...
-
Add Checkmark/Ticks To Your Ul List - WP SITES
-
How To Use Checkmark Or Tick Instead Of Bullet In Unordered List?
-
List-style - CSS-Tricks
-
Check Mark HTML Symbol, Character And Entity Codes - Toptal
-
How To Use Tick / Checkmark Symbol (✓) Instead Of Bullets In ...
-
CSS Checkmarks - CodePen
-
How To How To Change Bullet Lists Into Checkmarks Or Other Icons ...
-
CSS List-style Property - W3Schools
-
Checkmark Symbol – HTML For Checkmark Unicode - FreeCodeCamp
-
Unordered List With Font Awesome Checkmark Bullets
-
HTML Ul Tag - W3Schools
-
How To Add Tick Marks To List In WordPress | TL Dev Tech
-
How Do You Change Bullets To Check Marks On A List