O'Reilly logo

HTML5 and CSS3: Visual QuickStart Guide, Seventh Edition by Bruce Hyslop, Elizabeth Castro

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a Figure

As you well know, it’s a common convention in the print world to associate figures with text. A figure may be a chart, a graph, a photo, an illustration, a code segment, and so on. You’ve seen these at play in newspapers, magazines, reports, and more. Why, this very book has figures on most pages.

Prior to HTML5, there wasn’t an element designed for this purpose, so developers cobbled together solutions on their own, often involving the less-than-ideal, non-semantic div element. HTML5 changes that with figure and figcaption. By definition, a figure is a self-contained piece of content (with an optional caption) that is referred to by the main content of your document ( and ). The optional figcaption is a figure’s caption or ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required