What is <figure> tag?


Experience Level: Junior
Tags: HTML


The  <figure> tag is for self-contained content, frequently with a caption <figcaption> and is typically referenced as a single unit.  Usually a <figure>  is an image, illustration, diagram, code snippet, etc., that is referenced in the main flow of a document, but that can be moved to another part of the document or to an appendix without affecting the main flow.

E.g. if you wont to disply on your web page code example you can firs the <> ; , writte like en code. Without that the code won't be desplayed.

    <figure class="code-example">

<code class="language-html">&lt;p&gt;
	Have you ever seen &lt;i&gt;lorem ipsum&lt;/i&gt; phrase before?


No Comments Yet.
Be the first to tell us what you think.