Loading Please Wait...

Logo Lynxsia IT Solutions
HTML Audio

To embed an audio in HTML document, use <audio> element with <source> element.

<audio> Elements

<audio> element defines a container for audio content.

<source> element defines the audio source file. We can set more than one <source> element, the browser play the first recognized format.

controls attribute defines the audio controls like play, pause, volume, etc.

If the browser does not support audio element then the text inside <audio> and </audio> will be displayed.

Let's see with some example
					 
        
          <audio controls>
            <source src="audio.mp3" type="audio/mp4">
            <source src="audio.ogg" type="audio/ogg">
            Your browser does not support the audio tag.
          </audio>
        
      
Autoplay Audio

To play the audio automatically use the autoplay attribute.

Let's see with some example
					 
        
          <audio controls autoplay>
            <source src="audio.mp3" type="audio/mp4">
            Your browser does not support the audio tag.
          </audio>
        
      
Muted Audio

To mute the audio use the muted attribute.

Let's see with some example
					 
        
          <audio controls autoplay muted>
            <source src="audio.mp3" type="audio/mp4">
            Your browser does not support the audio tag.
          </audio>
        
      
<object> Element

The <object> element is used to include objects in HTML documents such as images, Java applets, PDF readers, Flash Players, another HTML document, etc.

Let's see with some example
					 
        
          <object width="100%" height="500px" data="about.html"></object>
        
      
<embed> Element

The <embed> element is used to embed objects in HTML documents such as Java applets, PDF readers, Flash Players, another HTML document, etc. It is similar to <object> element except it has benn not a part of HTML specifications until HTML5.

Let's see with some example
					 
        
          <embed src="about.html">
        
      

How you feel about this blog:

Share this blog on:

Report Us

If you find any error in the turtorials, or want to share your suggestion/feedback, feel free to send us email at: info@lynxsia.com

Contact Us
Ads
Logo
Lynxsia IT Solutions

We are concern with various development process like website design & development, E-commerce development, Software development, Application development, SMS & Bulk SMS Provider, PWA Development, and many more..

Kotwali Road, Chhiptehri, Banda, 210001, UP, India

Copyright © 2022, Lynxsia IT Solutions, All rights reserved