tags:

views:

207

answers:

3

most sites show the syntax as applying list-style:none to the <li> but i've seen some tutorial sites (like this one) that apply list-style:none to the <ul>

which one is the 'correct' way? any thoughts? thanx.

+5  A: 

According to the W3C CSS2 reference,

Inheritance will transfer the 'list-style' values from OL and UL elements to LI elements. This is the recommended way to specify list style information.

A version of the spec is here: http://www.zvon.org/xxl/CSS2Reference/Standard/generate.html#propdef-list-style

Pointy
hence the "cascade" in CSS
Mark Schultheiss
A: 

The W3C CSS spec says the following:

"list-style-type" Applies to: elements with 'display' value 'list-item'

so by default, your LI elements.

richsage
A: 

As not having a list style is generally more common that having a list style, I personally apply it to both in a global reset at the top of my stylesheet.

Tom