W3-Video WEB Tutorials

w3-video.com is a Free eLearning Website with over 500 video tutorials on HTML5, XAMPP, .htaccess, Firefox, Notepad++

HTML5 Tutorial

Home HTML5 XAMPP .htaccess Firefox Notepad++


figure ... ⁄figure


Share it

figure intro figure browser display figure parents - children figure syntaxfigure figcaption 1 examplefigure figcaption 3 examples

HTML5 figure element

The figure element allows you to mark up an independent unit of flow content, (from the main flow of the document), to which you can add a caption ⁄ legend through figcaption element. »video

About figure

Display & support figure

Firefox iconChrome iconIE icon9Opera iconSafari icon

Parents, children figure

Attributes figure

Examples

Syntax figure

1<figure> ... </figure> »video

Attributes and Values figure (comma separated)

<figureattribute="attribute_value(s)"> Video Examples
1. specific attributes
All Specific Attributes
2. global attributes
1.accesskey=keyboard key»img<figure accesskey="h"> ... </figure>
2.class=class name»html »img<figure class="class_name"> ... </figure>
3.contenteditable="",  , true, false »html<figure contenteditable="true"> ... </figure>
4.contextmenu=menu id value»html<figure contextmenu="menu_id_value"> ... </figure>
5.data-*= value -<figure data-http-error="404"> ... </figure>
6.dir=ltr, rtl, auto»html<figure dir="ltr"> ... </figure>
7.draggable= true,  , false»img<figure draggable="false"> ... </figure>
8.dropzone= copy, move, link, string:, file: -<figure dropzone="copy"> ... </figure>
9.hidden= "",  , hidden»html »img<figure hidden="hidden"> ... </figure>
10.id=id name»html »img<figure id="unique_id_name"> ... </figure>
11.itemid= URL --
12.itemprop= string »link »a-
13.itemref= string --
14.itemscope= "",  , itemscope--
15.itemtype= absolute URL --
16.lang=language code »html »head»title »img<figure lang="en"> ... </figure>
17.spellcheck="",  , true, false»html<figure spellcheck="true"> ... </figure>
18.style=CSS property:value»html »img<figure style="color:red"> ... </figure>
19.tabindex= integer »img<figure tabindex="3"> ... </figure>
20.title=text»html »link»style »abbr»dfn
»img »meter
<figure title="html page"> ... </figure>
21.translate="", yes, no»html »img<figure translate="yes"> ... </figure>
All Global Attributes
3. global event attributes
1.onclick=script» list<element onclick="script" > ...
2.ondblclick=script» list<element ondblclick="script" > ...
All Event Attributes

Video demonstration figure element

HTML5 figure: mark up a self-contained unit of flow content

min video details
00:00 video tutorial: figure element
00:06 figure element allows you to mark up a self-contained unit of flow content from the main flow of the document
00:11 figcaption element allows you to mark up the caption ⁄legend for the rest of the content of a figure element
00:23 3 cases:
00:23 case 1 :
- figure element without figcaption element (figcaption is optional)
- flow content nested inside
00:24 flow content inside
00:26 case 2 :
- figure element with figcaption element (figcaption is the 1st child);
- flow content nested inside figure AFTER figcaption
00:26 flow content after figcaption
00:29 case 3 :
- figure element with figcaption element (figcaption is the last child);
- flow content nested inside figure BEFORE figcaption
00:31 flow content before figcaption
00:52 example 1:
the video and its caption can represent a unit of self-contained flow content (independent flow content)

case3: figcaption preceded by flow content, where the figcaption gives the caption of the flow content:

figcaption: Avatar - Official Trailer
flow content: iframe element
(the video will be embedded in page within a nested browsing context: iframe)
01:19 a video and its caption, suitable content for figure element
01:26 the figcaption element is optional
01:30 no caption
01:44 example2:
this table and its caption can represent a unit of self-contained flow content (independent flow content suitable for figure element)

case2: figcaption followed by flow content, where the figcaption gives the caption of the flow content

figcaption: Box Office
flow content: table element
03:06 a table + its caption, a unit of independent flow content, suitable for the figure element ( = it means that it can be marked up with figure element)
03:14 example3:
(let's consider only a part of thus content)
an ordered list and its caption can represent a unit of self-contained flow content (independent flow content suitable for figure element)

case2: figcaption followed by flow content, where the figcaption gives the caption of the flow content:

figcaption: Box Office
flow content: ol element
03:47 an ordered list + its caption, a unit of independent flow content, suitable for the figure element
03:58 example4:
an image (photo, illustration..) and its caption ⁄legend can represent a unit of self-contained flow content (independent flow content suitable for figure element)

case3: figcaption preceded by flow content, where the figcaption gives the caption of the flow content:
figcaption: Rosario Dawson (34)
flow content: img element
04:34 an image + its caption, a unit of independent flow content, suitable for the figure element

For more information about the figure element, please see the specs: W3CWHATWG