Audio Tag
HTML5 <audio> tag is used to include or embed audio files in to Web pages OR HTML Documents. The audio tag has some most useful attributes which allow the users to control audio playback.
Attributes Of Audio Tag
Attribute | Value | Description |
---|---|---|
src | File Path | SRC attribute specifies the path to the audio file which will be embedded into the web page. |
controls | Values | controls attribute is ued to show the player's controls. If the "controls" attribute is used then it will enable the controls. If we don't use controls attribute, no controls will be shown. Audio tag can be customized by using the Javascript. |
autoplay | Value | Autoplay is used to start audio automatically. |
loop | Value | Loop is used to set the audio loop whether it play again, once it has finished. |
Multiple Audio Sources
<audio controls autoplay>
<source
src="audio/test-audio.ogg"
/>
<source
src="audio/test-audio.mp3"
/>
<p>
Browser does not support audio format.
</p>
</audio>
Output:
Stylish Audio Player
Get free Stylish HTML5 Audio Player for your website or Blog. Here
HTML Tags
- Comment
- A
- Abbr
- Acronym
- Address
- Applet
- Article
- Aside
- Audio
- B
- Base
- Basefont
- Bdi
- Bdo
- Big
- Blink
- Blockquote
- Body
- Br
- Button
- Canvas
- Caption
- Center
- Cite
- Code
- Col
- Colgroup
- Datalist
- Dd
- Del
- Details
- Dfn
- Dialog
- Dir
- Div
- Dl
- Dt
- em
- Embed
- Fieldset
- Figcaption
- Figure
- Font
- Footer
- Form
- Frame
- Frameset
- H1 - H6
- Head
- Header
- Hr
- Html
- I
- Iframe
- Img
- Input
- Ins
- Kbd
- Keygen
- Label
- Legend
- Li
- Link
- Main
- Map
- Mark
- Menu
- Menuitem
- Meta
- Meter
- Nav
- Noframes
- Noscript
- Object
- Ol
- Optgroup
- Option
- Output
- P
- Param
- Pre
- Progress
- Q
- Rp
- Rt
- Ruby
- S
- Samp
- Section
- Select
- Small
- Source
- Span
- Strike
- Strong
- Style
- Sub
- Summary
- Sup
- Table
- Tbody
- Td
- Tfoot
- Th
- Thead
- Time
- Title
- Tr
- Track
- Tt
- U
- Ul
- Var
- Video
- Wbr
- Script
0 Comments