HTML5 - Figure Tag




HTML5 Figure Tag

Html <figure> tag is used to mark up a photo in the document on the web page. We know that in html image tag is already available for display images on web browser but html5 introduce new tag <figure> tag to handle the group of diagrams, photos, code listing etc.

Example

<!DOCTYPE>
<html>
<body>
<p><strong>James Gosling</strong> Java is a general-purpose computer-programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible.</p>
<figure>
<img src="img/freefeast_gosling.jpg" title="James Gosling" alt="James Gosling" style="width:100%">
</figure>
</body>
</html>

Result

James Gosling Java is a general-purpose computer-programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few implementation dependencies as possible.

James Gosling

The <figure> tag indicates independent substance, in the same way as delineations, graphs, photographs, code postings, and so on.

While the substance of the <figure> component is identified with the fundamental stream, its position is free of the primary stream, and if uprooted it ought not influence the stream of the record.