HTML and CSS Reference
In-Depth Information
Styling Captions
The caption element, as you saw earlier, will typically appear above its parent table element. Its position
is determined by the caption-side property. Using the markup in Listing 7-25 and the CSS in Listing 7-
26, you'll see the ease with which you can style a table's caption.
Listing 7-25. A table with an added caption element
<h2>Power Outfitters Inventory</h2>
<p>Power Outfitters continues to stock only the finest products 
 for all your crime-solving needs.</p>
<col id="products-column">
<col id="quantity-column">
<col id="price-column">
<col id="totals-column">
<th scope="col">Product</th>
<th scope="col">Quantity</th>
<th scope="col">Price</th>
<th scope="col">Totals</th>
<th scope="row">Utility Belts</th>
<th scope="row">Grappling Hooks</th>
<th scope="row">Smoke Pellets</th>
<th scope="row">Totals</th>
Search WWH ::

Custom Search