An unstyled table caption will be displayed above the table. On most modern browsers the caption will be center aligned, but you can change the default caption alignment using text-align: left. To increase the space between the caption and its table, margin-bottom can be set to .5em. The caption also can be given more weight to make it stand out from the table content. This is achieved using font-weight:bold as shown in Listing 14.9. The results can be seen in Figure 14.1. Listing 14.9. CSS Code for Styling the Captioncaption { text-align: left; margin: 0 0 .5em 0; font-weight: bold; } Figure 14.1. Screenshot of styled caption.
|