Difference between revisions of "HTML/Elements/figure"

From W3C Wiki
< HTML‎ | Elements
Jump to: navigation, search
(HTML Reference)
m (HTML Reference: Fixed the Figure section to correctly link to the appropriate HTML5 spec, instead of a broken link)
Line 57: Line 57:
 
== HTML Reference ==
 
== HTML Reference ==
  
The &lt;figure&gt; element was introduced in HTML5 - [http://www.w3.org/TR/html5/semantics.html#the-figure-element 4.5.11 The figure element].
+
The &lt;figure&gt; element was introduced in HTML5 - [http://www.w3.org/TR/html5/grouping-content.html#the-figure-element 4.5.11 The figure element].
  
 
[[Category:HTML]]
 
[[Category:HTML]]
 
[[Category:HTMLElement]]
 
[[Category:HTMLElement]]

Revision as of 21:10, 12 October 2013

<figure>

The <figure> element represents some flow content.

Point

  • Some examples of cases:
    • annotate illustrations
    • diagrams
    • photos [Example A]
    • code listings ...
  • That are referred to from the main content of the document, But without affecting the flow of the document.
  • The figure element is able to have a caption.
    The figcaption element child of the element, represents the caption of the figure element's contents.


HTML Attributes

See global attributes.


Examples

Example A

[try it]

<figure>
  <figcaption>The Stata Center</figcaption>
  <img src="stata.jpg" alt="The Stata Center Building">
</figure>

Figure01.png

HTML Reference

The <figure> element was introduced in HTML5 - 4.5.11 The figure element.