Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- CSS/HTML Rendering in IE VS Firefox / Opera


SuzyUK - 2:13 pm on Oct 16, 2004 (gmt 0)


You're Welcome ;)

About the list of what elements are what, I have an offline guide I used to use, and can't even remember where I picked up the info from now!

however I found this Sample Stylesheet [w3.org] which is not exactly the list you're after becuase it shows the recommended defaults (padding/margin etc) that the browsers use.. so it's a guide in that respect and not strictly adhered to as far as padding/margins go.

Anyhow in the absence of a list I could link to I thought it made a compact list that might help you for a start.

Those elements, listed at the top are all block level by default.. e.g.

html, address,
blockquote,
body, dd, div,
dl, dt, fieldset, form,
frame, frameset,
h1, h2, h3, h4,
h5, h6, noframes,
ol, p, ul, center,
dir, hr, menu, pre { display: block }

for the other elements it either lists a special display-type [w3.org] e.g. inline-block, which is usually "block" with other special features but consult the link for more info on these display types..

and then if there's no display type for an element listed or the element is not in that list it is an Inline element

e.g.
i, cite, em,
var, address { font-style: italic }

The above are all inline elements..
<span> is not mentioned in the list at all because all it's various defaults are zero and it is an inline element.

In general inline elements should just be used to format text content which is already inside a block level element

e.g.
<p>This paragragh is the block level element with some <i>inline italics added</i> then the block element continues</p>

<p> is the block element/box which contains some inline formatting

<span> is a generic inline element which can be used to create your own inline formatting.

Generally: A block level element always starts a new line in your web browser

I recommend getting yourself a good HTML Book, as a "always keep on the desk" book, while all the information can be found online as you say it's all over the place and you mightn't know where to look in the beginning! My HTML "bible" (SAMS Teach Yourself Web Publishing with HTML and XHTML) is old and decrepit looking, but still never far from my hand

Suzy


Thread source:: http://www.webmasterworld.com/css/4741.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com