Students Empire

Learn Something New
Home

Learn HTML




figure


figure and figcaption to create figures


HTML5 figures are content, optionally with a caption, self-contained, typically referenced as a single unit.


You define figures using the figure element.


The figure element can optionally contain a figcaption element, which denotes a caption for the figure.


			        <!DOCTYPE HTML>
			    <html>
			    <body>
			    <figure>
			    <figcaption>Listing 01. Using the code element</figcaption>
			    <code>
			    var fruits = ["CSS", "HTML", "CSS", "Javascript"];<br>
			    document.writeln("I like " + fruits.length + " fruits");
			    </code>
			    </figure>
			    </body>
			    </html>