The display attribute is one of the most important stylesheet commands because it controls not only how each object on your page is displayed but also how it is related to the other objects around it. It can have the following values:
- block this is the default value for most block level tags eg. div, p.
- inline this is the default value for most inline tags eg. span, b.
- list-item this is the default value for the li tag.
- table this is the default for the table tag.
- table-cell this is the default for the td tag.
- none removes the object from being displayed on the page. Note that some older browsers remove it from the page source completely making it impossible to change the display type from this setting if it is what is initially set.
This article written by Stephen Chapman, Felgall Pty Ltd.