One small page that uses every element of this section. Turn on Show tags and point at any part of
the page: a label tells you which element draws it. Click to jump to that element's details below.
Embedded contentWritten for this site
Every element of this section is in the page above. Point at one to find it, click it to read its details.
Tags with a dashed border are not drawn on the page: look for them in the code below.
<div class="gallery"> <figure> <picture> <source srcset="https://developer.mozilla.org/shared-assets/images/examples/surfer.jpg" media="(max-width: 600px)"> <img src="https://developer.mozilla.org/shared-assets/images/examples/painted-hand.jpg" alt="An open hand covered in blue and red paint" width="298" height="332"> </picture> <figcaption><b>picture, source, img</b>: a painted hand on wide screens, a surfer on narrow ones. Make the window narrow to swap.</figcaption> </figure> <figure> <video controls crossorigin="anonymous" width="320" src="https://developer.mozilla.org/shared-assets/videos/friday.mp4"> <track default kind="captions" srclang="en" label="English" src="https://developer.mozilla.org/shared-assets/misc/friday.vtt"> </video> <figcaption><b>video, track</b>: press play, the captions come from the track.</figcaption> </figure> <figure> <audio controls src="https://developer.mozilla.org/shared-assets/audio/t-rex-roar.mp3"></audio> <figcaption><b>audio</b>: a dinosaur roar.</figcaption> </figure> <figure> <iframe title="A small page inside this page" srcdoc="<p style='font:16px system-ui;margin:16px'>I am a whole web page, framed inside another one.</p>"></iframe> <figcaption><b>iframe</b>: a page inside the page.</figcaption> </figure> <figure> <embed type="image/jpeg" src="https://developer.mozilla.org/shared-assets/images/examples/flowers.jpg" width="250" height="200"> <figcaption><b>embed</b>: an external resource, here purple flowers.</figcaption> </figure> <figure> <object type="video/mp4" data="https://developer.mozilla.org/shared-assets/videos/flower.mp4" width="250" height="200"></object> <figcaption><b>object</b>: another way to embed a resource, here a video.</figcaption> </figure> <figure> <map name="infographic"> <area shape="poly" coords="130,147,200,107,254,219,130,228" href="https://developer.mozilla.org/docs/Web/HTML" alt="HTML"> <area shape="poly" coords="130,147,130,228,6,219,59,107" href="https://developer.mozilla.org/docs/Web/CSS" alt="CSS"> <area shape="poly" coords="130,147,200,107,130,4,59,107" href="https://developer.mozilla.org/docs/Web/JavaScript" alt="JavaScript"> </map> <img usemap="#infographic" src="https://developer.mozilla.org/shared-assets/images/examples/mdn-info2.png" alt="MDN infographic"> <figcaption><b>map, area</b>: each colored part of the image is a different link.</figcaption> </figure> <figure> <svg viewBox="0 0 120 120" width="120" height="120" role="img" aria-label="A smiling sun"> <circle cx="60" cy="60" r="34" fill="#facc15"></circle> <circle cx="48" cy="54" r="4" fill="#78350f"></circle> <circle cx="72" cy="54" r="4" fill="#78350f"></circle> <path d="M46 70 Q60 82 74 70" stroke="#78350f" stroke-width="4" fill="none" stroke-linecap="round"></path> </svg> <figcaption><b>svg</b>: a drawing made of shapes, sharp at any size.</figcaption> </figure> <figure> <p class="formula"> <math display="block"> <mrow> <mi>x</mi><mo>=</mo> <mfrac> <mrow><mo>−</mo><mi>b</mi><mo>±</mo><msqrt><mrow><msup><mi>b</mi><mn>2</mn></msup><mo>−</mo><mn>4</mn><mi>a</mi><mi>c</mi></mrow></msqrt></mrow> <mrow><mn>2</mn><mi>a</mi></mrow> </mfrac> </mrow> </math> </p> <figcaption><b>math</b>: a math formula written with MathML.</figcaption> </figure></div>
MDN The <picture>HTML element contains zero or more <source> elements and one <img> element to offer alternative versions of an image for different display/device scenarios.
Live previewExample from MDN
<!--Change the browser window width to see the image change.--><picture> <source srcset="https://developer.mozilla.org/shared-assets/images/examples/surfer.jpg" media="(orientation: portrait)" /> <img src="https://developer.mozilla.org/shared-assets/images/examples/painted-hand.jpg" alt="" /></picture>
WHATWG Image source for img or media source for video or audio
MDN The <source>HTML element specifies one or more media resources for the <picture>, <audio>, and <video> elements. It is a void element, which means that it has no content and does not require a closing tag. This element is commonly used to offer the same media content in multiple file formats in order to provide compatibility with a broad range of browsers given their differing support for image file formats and media file formats.
MDN The <img>HTML element embeds an image into the document.
Live previewExample from MDN
<img class="fit-picture" src="https://developer.mozilla.org/shared-assets/images/examples/grapefruit-slice.jpg" alt="Grapefruit slice atop a pile of other slices" />
MDN The <embed>HTML element embeds external content at the specified point in the document. This content is handled by the browser or an external application.
MDN The <object>HTML element represents an external resource, which can be treated as an image, a nested browsing context, or a resource to be handled by a plugin.
MDN The <video>HTML element embeds a media player which supports video playback into the document. You can use <video> for audio content as well, but the <audio> element may provide a more appropriate user experience.
Live previewExample from MDN
<video controls width="250"> <source src="https://developer.mozilla.org/shared-assets/videos/flower.webm" type="video/webm" /> <source src="https://developer.mozilla.org/shared-assets/videos/flower.mp4" type="video/mp4" /> Download the <a href="https://developer.mozilla.org/shared-assets/videos/flower.webm">WEBM</a> or <a href="https://developer.mozilla.org/shared-assets/videos/flower.mp4">MP4</a> video.</video>
MDN The <audio>HTML element is used to embed sound content in documents. It may contain one or more audio sources, represented using the src attribute or the <source> element: the browser will choose the most suitable one. It can also be the destination for streamed media, using a MediaStream.
Live previewExample from MDN
<figure> <figcaption>Listen to the T-Rex:</figcaption> <audio controls src="https://developer.mozilla.org/shared-assets/audio/t-rex-roar.mp3"></audio> <a href="https://developer.mozilla.org/shared-assets/audio/t-rex-roar.mp3"> Download audio </a></figure>
MDN The <track>HTML element is used as a child of the media elements, <audio> and <video>. Each track element lets you specify a timed text track (or time-based data) that can be displayed in parallel with the media element, for example to overlay subtitles or closed captions on top of a video or alongside audio tracks.
Live previewExample from MDN
<video controls src="https://developer.mozilla.org/shared-assets/videos/friday.mp4"> <track default kind="captions" srclang="en" label="English" src="https://developer.mozilla.org/shared-assets/misc/friday.vtt" /> Download the <a href="https://developer.mozilla.org/shared-assets/videos/friday.mp4">MP4</a> video, and <a href="https://developer.mozilla.org/shared-assets/misc/friday.vtt">subtitles</a>.</video>
video { width: 250px;}video::cue { font-size: 1rem;}
MDN The <area>HTML element defines an area inside an image map that has predefined clickable areas. An image map allows geometric areas on an image to be associated with hypertext links.
MDN The <math>MathML element is the top-level MathML element, used to write a single mathematical formula. It can be placed in HTML content where flow content is permitted.
Live previewExample from MDN
<p> The infinite sum <math display="block"> <mrow> <munderover> <mo>∑</mo> <mrow> <mi>n</mi> <mo>=</mo> <mn>1</mn> </mrow> <mrow> <mo>+</mo> <mn>∞</mn> </mrow> </munderover> <mfrac> <mn>1</mn> <msup> <mi>n</mi> <mn>2</mn> </msup> </mfrac> </mrow> </math> is equal to the real number <math display="inline"> <mfrac> <msup> <mi>π</mi> <mn>2</mn> </msup> <mn>6</mn> </mfrac> </math> .</p>
MDN The <svg>SVG element is a container that defines a new coordinate system and viewport. It is used as the outermost element of SVG documents, but it can also be used to embed an SVG fragment inside an SVG or HTML document.