Foundation HTML5 with CSS3

(Steven Felgate) #1

Chapter 7




Grappling Hooks
27


Smoke Pellets
623




Totals
659



Figure 7-9 shows the browser output of the code in Listing 7-20 using only the browser’s default styling.


Figure 7-9. Browser output of a table with a caption


In most browsers, the caption element appears above its table and with center-aligned text. Placement of
the caption element can be adjusted in CSS using the caption-side property and we'll show you
examples of this in the section on styling tables later in this chapter.


While the caption element is optional, we strongly recommended that you include one for accessibility
purposes and as a general best practice. You can sometimes get away with omitting the caption element
if the table is introduced in the content with an h1-h6 heading or in a preceding paragraph.

Free download pdf