Home Tutorial Html Html5 HTML5 audio controls, Discuss the controls attribute of audio tag.

 
 

HTML5 audio controls, Discuss the controls attribute of audio tag.
Posted on: September 4, 2010 at 12:00 AM
Advertisement
In this section, you will see the use and implementation of controls attributes of audio tag.

HTML5 audio controls, Discuss the controls attribute of audio tag.

Introduction:

The controls is attribute of audio. which is used for showing media player on browser. It supports only Boolean value. If it is present in audio tag. Media will be shows on screen otherwise not..

Controls attribute:
Attribute Value Description
controls Boolean If it is present in audio tag file; music controls will be display on screen.

Declaration Syntax :

Declaration syntax of autoplay attribute  in HTML5.

                       <audio src="URL" controls >Content</audio>

Example of <audio> in HTML5:

Code:
AudioControls.html
<!DOCTYPE html >
<html >
<head>
<title>Controls attributes.</title>
</head>
<body>
<p><b>Example of controls attributes in HTML5.</b></p>
<audio src="a2.mp3" controls >
Browser does not support audio tag.
</audio>
</body>
</html>
Output:

Download this code

Difference Between HTML5 and HTML4.01:

The audio tag  is only available in HTML5. It is not available in HTML4.01.

Advertisement

Related Tags for HTML5 audio controls, Discuss the controls attribute of audio tag.:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: September 4, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com