Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between list-style-type and list-style?

Tags:

html

css

When I am coming to the point of styling lists, I find myself unsure of the difference between list-style and list-style-type. Are they the same?

like image 989
Genmais Avatar asked Nov 10 '13 11:11

Genmais


People also ask

What is the use of list style type in CSS?

The list-style-type CSS property sets the marker (such as a disc, character, or custom counter style) of a list item element.

What are list styles?

The list-style-type property defines the type of list by setting the content of each marker, or bullet, on the list. Acceptable keyword values for list-style-type include: disc. circle.

How many types of list style are there in HTML?

In HTML, there are two main types of lists: unordered lists (<ul>) - the list items are marked with bullets. ordered lists (<ol>) - the list items are marked with numbers or letters.

Which is the default list style type of list?

The default list-style-type value for an ordered list is decimal , whereas the default for an unordered list is disc . Accepted values for the list-style-type property include: Unordered: disc (default)


1 Answers

From www.w3schools.com :

"The list-style shorthand property sets all the list properties in one declaration."

and here

"The list-style-type specifies the type of list-item marker in a list."

list-style is the shorthand to set list-style-type, list-style-position and list-style-image properties all in one declaration.

like image 191
Sergio Terrasi Avatar answered Oct 11 '22 11:10

Sergio Terrasi