× Introduction HTML Editors Web Components Headings Paragraph Attributes Entities Images Comments Formatting Links File Paths Book Marks Image Links Unordered Lists Ordered Lists Tables Forms Other Form Elements Semantic tags Media Div and Span Examples Projects eBooks









HTML Media Elements

In this tutorial you will learn how to embed media like audio and video into an HTML document.

Multimedia

Multimedia can be almost anything you can hear or see, like images, music, sound, videos, records, films, animations, and more. Web pages often contain multimedia elements of different types and formats..

HTML5 audio Element

HTML5 provides a new standard for embedding an audio file on a web page. You can embed an audio file to a page using the <audio> element:

Example:   Try It

    
<audio controls>
<source src="media/audio.mp3" type="audio/mpeg">
Your browser does not support the audio element.
</audio>

Result:


HTML5 audio Element

HTML5 provides a new standard for embedding an video file on a web page. You can embed an video file to a page using the <video> element:

Example:   Try It

<video width="500" height="300" controls>
<source src="media/video.mp4" type="video/mp4">
Your browser does not support the video tag.
</video>

Result: