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++


figcaption ... ⁄figcaption


Share it

figcaption intro figcaption browser display figcaption parents - children figcaption vs captionfigcaption syntax

HTML5 figcaption element

The figcaption element allows you to add a caption ⁄ legend to the content of a figure element. »video
e.g. add a caption to a picture, a legend to a diagram...annotate illustrations, code listings etc

About figcaption

Display & support figcaption

Firefox iconChrome iconIE icon9Opera iconSafari icon

Parents, children figcaption

Attributes figcaption

Warning

The difference between caption and figcaption elements: »video

Examples

Syntax figcaption

1<figcaption> ... </figcaption> »video

Attributes and Values figcaption (comma separated)

<figcaptionattribute="attribute_value(s)"> Video Examples
1. specific attributes
All Specific Attributes
2. global attributes
1.accesskey=keyboard key»img<figcaption accesskey="h"> ... </figcaption>
2.class=class name»html »img<figcaption class="class_name"> ... </figcaption>
3.contenteditable="",  , true, false »html<figcaption contenteditable="true"> ... </figcaption>
4.contextmenu=menu id value»html<figcaption contextmenu="menu_id_value"> ... </figcaption>
5.data-*= value -<figcaption data-http-error="404"> ... </figcaption>
6.dir=ltr, rtl, auto»html<figcaption dir="ltr"> ... </figcaption>
7.draggable= true,  , false»img<figcaption draggable="false"> ... </figcaption>
8.dropzone= copy, move, link, string:, file: -<figcaption dropzone="copy"> ... </figcaption>
9.hidden= "",  , hidden»html »img<figcaption hidden="hidden"> ... </figcaption>
10.id=id name»html »img<figcaption id="unique_id_name"> ... </figcaption>
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<figcaption lang="en"> ... </figcaption>
17.spellcheck="",  , true, false»html<figcaption spellcheck="true"> ... </figcaption>
18.style=CSS property:value»html »img<figcaption style="color:red"> ... </figcaption>
19.tabindex= integer »img<figcaption tabindex="3"> ... </figcaption>
20.title=text»html »link»style »abbr»dfn
»img »meter
<figcaption title="html page"> ... </figcaption>
21.translate="", yes, no»html »img<figcaption translate="yes"> ... </figcaption>
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 figcaption element

HTML5 mark up the caption of the content of a figure element

min video details
00:00 video tutorial: figcaption 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 figcaption element, please see the specs: W3CWHATWG