Displaying and Hiding Elements
The display property is useful for hiding or revealing particular elements. You can also override an element's natural display type (from block-level to inline, or vice-versa). Or you can display an element as a list itemeven without the li tag.
Figure 12.1. Here's the (X)HTML: three simple paragraphs with an image in each one. The middle paragraph has a class of hide.
Figure 12.2. The only CSS applied here is a 2 pixel bottom margin to the elements. All three paragraphs and their images are visible.
To specify how elements should be displayed:
To control an element's visibility: