figure

< html‎ | elements
Jump to: navigation, search

figure

This article is In Progress.



Summary

The figure element (<figure>) represents self-contained content, optionally with a caption, that can be referenced as a single unit from the main content of the document.


Overview Table

DOM Interface HTMLElement


Compatibility

Do you think this data can be improved? You can ask to add by opening an issue or make a pull request.

Desktop

FeaturesChromeFirefoxInternet ExplorerOperaSafari
Basic support
8
Yes
?
Unknown
9.0
Yes
11.10
Yes
5.1
Yes

Mobile

FeaturesAndroidFirefox MobileIE MobileOpera MobileSafari Mobile
Basic support
3.0
Yes
4.0
Yes
9.0
Yes
11.0
Yes
5.1
Yes

Examples

This example shows the figure element to mark up a code listing. The figcaption element represents the caption of the figure. The author has also provided a link to the figure in the main content by using a named anchor.

<!-- Main Content -->
<p>In <a href="#l4">listing 4</a> we see the primary core interface API declaration.</p>
<!-- Figure Content -->
<figure id="l4">
    <figcaption>Listing 4. The primary core interface API declaration.</figcaption>
    <pre><code>interface PrimaryCore {
 boolean verifyDataLine();
 void sendData(in sequence&lt;byte> data);
 void initSelfDestruct();
}</code></pre>
</figure>

Notes

Remarks

The figure element can be used to annotate content that can be referenced from the main content of the document, such as illustrations, diagrams, photos, code listings, and so on. Figures can be moved away from primary content without affecting the flow of the document. You can jump to the figure from the main content by using a named anchor. The id attribute of the figure element specifies the fragment identifier (name of the anchor). The default CSS for the figure element is as follows.

margin: 1em 40px

The figure element, like aside, separates content from the main flow. Use the aside element when the content is simply related, but not essential. Use figure if the content is essential, but position is not important. Windows Internet Explorer 9. The figure element is only supported for webpages displayed in IE9 Standards mode. For more information, see Defining Document Compatibility.

Standards information

There are no standards that apply here.

HTML information

{


See also

Related pages (MSDN)

  • Reference
  • article
  • aside
  • figcaption
  • footer
  • header
  • hgroup
  • mark
  • nav
  • section

Attribution

This article contains content originally from external sources.

Portions of this content come from the Microsoft Developer Network: [Windows Internet Explorer API reference Article]