How to Add Audio in HTML Using audio Tag
How to Add Audio in HTML Using audio Tag
Learn HTML audio Tag
The <audio> has been added to HTML5 to allow embedding audio files to a web page.
not all browsers support all audio format the audio file is encoded using special codecs.
The <source> tag or the src attribute is used to indicate the variations of the same audio file.
The path to audio file can contain absolute and relative URL.
Syntax: The <audio> tag comes in pairs; the content is written between the opening (<audio>) and the closing (</audio>) tags.
Syntax
<audio controls>
<source src="/desktop/audio_friendship.mp3" type="audio">
</audio>
Learn HTML audio Tag
Example
Learn HTML audio Tag
Explain program
Step 1 ]
<!Doctype html>
- <!doctype html> always be the first line of any HTML document.
<!Doctype html>
- <!doctype html> always be the first line of any HTML document.
Step 2 ]
<html> and </html>
html is the root element.
<html> and </html>
html is the root element.
Step 3 ]
<body> and </body>
body is main content area.
All visible content inside to the <body> tag
<body> and </body>
body is main content area.
All visible content inside to the <body> tag

Post a Comment