Using & Playing Audio Files
Posted: Sun Feb 26, 2017 12:37 pm
Audio can be added to a web page by using the audio element.
The audio element has a start and an end tag. In this example, a source URL is specified by using a source element.
The audio element has a start and an end tag. In this example, a source URL is specified by using a source element.
Code: Select all
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example document</title>
</head>
<body>
<audio controls>
<source src="audio_file.mp3" type="audio/mpeg">
Audio element not supported in this browser.
</audio>
</body>
</html>