You’re viewing an archive of outdated material. Visit The Web Standards Project’s updated site to learn about our current mission.

Display Property Demonstrations

Example 1: inline

In the following example, we see a UL element used to depict a brief links list. This would typically be used to give a list of contents at the top of a page.



In case the above renders as a list instead of a line, or in case the above has bullets, here is what should have been shown:


W3C WSP GNU FSF FHF


Using a list element, instead of a paragraph element (as was used in the second instance to simulate the effect), means that styling is much more dynamic. Furthermore, a paragraph doesn't actually describe the structure of the links: they are, after all, a list, and not a paragraph.

Example 2: list-item

In the following example, we see five paragraphs. They should be numbered.


W3C

WSP

GNU

FSF

FHF


The above probably renders as five simple paragraphs, but here is what should happen:


  1. W3C
  2. WSP
  3. GNU
  4. FSF
  5. FHF

An example of where this would be very useful is the main index page of this set of documents: the headers are numbered, but the numbering had to be added manually! If only this property was supported properly, then authors would not need to do this.

Conclusion

The display property is a powerful feature -- indeed, with XML, it will be the only way of telling the browser how to render the document at its most basic level. While the support shown so far is a good effort, it is still not complete.