HTML for Beginners: Audio and Video #15

HTML for Beginners: Audio and Video #15

HTML for Beginners: Audio and Video #15

Audio

The <audio> tag in HTML is used to embed sound content material in paperwork. It permits you to play audio recordsdata inside your net pages with out requiring any extra plugins. The <audio> ingredient helps a number of audio codecs and gives varied attributes to manage its habits.

• src: Specifies the trail to the audio file

• controls: Adds audio controls, like play, pause, and quantity

• autoplay: Automatically begins taking part in the audio as quickly as it’s loaded

• loop: Loops the audio playback

• muted: Mutes the audio by default

• preload: Specifies how the audio must be loaded when the web page masses. It can have the next guidelines:

  • none: The audio file shouldn’t be loaded when the web page masses
  • metadata: Only the metadata (resembling size) is loaded when the web page masses
  • auto: The complete audio file is loaded when the web page masses
<audio src="/instance.mp3" kind="audio/mp3" controls></audio>

If you add the controls attribute, it shows the UI controller as proven beneath. You can obtain music from Pixabay.

Video

HI-FI News

through Programming on Medium https://ift.tt/3m1blOI

July 31, 2024 at 08:48AM