Home Tutorial Html Html5 HTML5 figure example, Define figure and figcapation tag.

 
 

HTML5 figure example, Define figure and figcapation tag.
Posted on: September 6, 2010 at 12:00 AM
In this section, you will see the use of figure and figcapation tag of HTML5.

HTML5 figure example, Define figure and figcapation tag.

In this section, you will see the use of figure and figcapation tag of HTML5. Both are new. The figure tag is used to show flow content and figcaption tag represent caption of element. The flow content are elements, that are used in body tag. You can remove figure tag. It can not affect document actual meaning. It works as a single unit. the figcaption is an optional.

Declaration Syntax :

Declaration syntax of figure  and  figcapation in HTML5.

         <figure  >
                    flow controls</figure  >
                   <figcaption>
                                caption</figcaption>                         

Example of <figure > in HTML5:

Code:
figureTag.html
<!DOCTYPE html >
<html >
<head>
<title>Figure tag og HTML5.</title>
</head>
<body>
<h1>Implementation of figure and figcapation tag.</h1>
<figure>
<img src="comp.gif">
<figcaption>This picture represents a computer image.</figcaption>
</figure>
</body>
</html>
Output:

Download this code

Difference Between HTML5 and HTML4.01:

The fieldset tag is available in both HTML5 and HTML4.01. But there is some attribute in HTML5, that is not supported by HTML4.01.

Related Tags for HTML5 figure example, Define figure and figcapation tag.:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.