How to Embed Music in HTML

In this article we will discuss about how to include the music in HTML page.
  • 1853

We can include music in HTML by using embed Tag and we can use src attribute to include the music in HTML and its depend on the media player available in the system of the user. To change the appearance of the embedded media player we need to set some attributes and these are Height, width etc. The description of these Attributes are as follows:

  • width - The width of the media player.
  • height - The height of the media player.
  • hidden - Determines if the media player is visible.

HTML Code:

<html>

<body>

    <embed src="beethoven.mid" autostart="true" width="400" height="20">

</body>

</html>

In the above HTML Code Its auto start attribute has been set to true which means it will automatically started when the music will be finished.

Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

Categories

More Articles

© 2020 DotNetHeaven. All rights reserved.