Re: display property

On Thu, 2003-06-26 at 14:31, Ian Hickson wrote:
> The user agent stylesheet is not the "default". The default is given by
> the initial value of the property, which in the case of 'display', is
> indeed 'inline'.

But are not certain elements block by default, i.e., div, p. Or do they
directly rely on the default state of the display property?

"Note that although the initial value of 'display' is 'inline', rules in
the user agent's default style sheet may override this value. See the
sample style sheet for HTML 4.0 in the appendix."

SO what is the difference between block as it applies to the display
propert and block level as it applies to html elements?


7.5.3 Block-level and inline elements
        
Formatting
        By default, block-level elements are formatted differently than
        inline elements. Generally, block-level elements begin on new
        lines, inline elements do not. For information about white
        space, line breaks, and block formatting, please consult the
        section on text.

Now if this is the default behavior of block-level elements such as p or
div independent of css then display: block; is indeed redundant no? Or
is this assuming the UA internal styles will define this by default.

Received on Friday, 27 June 2003 10:05:13 UTC