Embedding Audio
The <audio> tag, helps us to embed the required audio into the webpage. The control property adds playback control like play, pause, volume. etc. The <source> tag specifies the specific audio file and the type attribute is used to specify the MIME (Multipurpose Internet Mail Extensions) type. If the browser does not support video a tag then the content present inside will be displayed.
Example: Illustration of embedding audio in an HTML document.
HTML
<!DOCTYPE html> < html lang = "en" > < head > < meta charset = "UTF-8" > < meta name = "viewport" content=" width = device -width, initial-scale = 1 .0"> < title >Embedding audio in HTML</ title > </ head > < body > < audio controls> < source src = "Small_audio.mp3" type = "audio/mp3" > Your browser does not support the audio tag. </ audio > </ body > </ html > |
Output:
How to Embed Multimedia in HTML ?
A variety of tags such as the <img> tag, <video> tag, and <audio> tag are available in HTML to include media on your web page. Multimedia combines different media, such as images, audio, and videos. Users will have a better experience when multimedia is embedded into HTML. Early web browsers only supported text and were limited to a single font in a single color. However, later browsers introduced support for various fonts, images, and multimedia elements.
Note: Provide multiple video formats such as .wav, .mp3, .mp4, .mpg, .wmv, etc.
Contact Us