HTML& CSS for Beginners by Jo Foster

HTML& CSS for Beginners by Jo Foster

Author:Jo Foster
Language: eng
Format: epub
Publisher: Elluminet Press
Published: 2019-05-12T16:25:36+00:00


Adding Audio

If you are adding background music or any sound to your website, make sure it is appropriate and complements the website. There is nothing worse than going to a website and have annoying music or sound blaring at you.

To add audio, use the <audio>...</audio> tags.

<audio controls>

<source src=”music.mp3” type=”audio/mpeg”>

</audio>

loop attribute loops the music to play over again.

controls attribute shows play, stop, track and volume control

autoplay attribute starts playing music automatically - do not use!! It makes websites unbearable and annoying.

Have a look at the code highlighted in the html file below. You can see in the web page, the control has been added to the bottom of the page. Try some of the other attributes and see what happens.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.