Audio-Video-Tag Css
Audio-Video-Tag Css
The <video> tag is used to embed video content in a document, such as a movie clip or other video
streams.
The text between the <video> and </video> tags will only be displayed in browsers that do not
support the <video> element.
There are three supported video formats in HTML: MP4, WebM, and OGG.
Example:
<video width="320" height="240" controls>
<source src="movie.mp4" type="video/mp4">
</video>
Attribute Description
autoplay Specifies that the video will start playing as soon as it is ready
controls Specifies that video controls should be displayed (such as a play/pause button etc).
loop Specifies that the video will start over again, every time it is finished
muted Specifies that the audio output of the video should be muted
poster Specifies an image to be shown while the video is downloading, or until the user hits
the play button
MPEG-4 Part 14, or MP4, is a digital multimedia container format most commonly used to store video
and audio, but it can also be used to store other data such as subtitles and still images.
Ogg is a multimedia container format that's commonly used for storing and playing audio and video
files.
The WEBM file format is a video file format that was created by Google to store video content and
implement compression standards for optimal video streaming on the Internet.
HTML <audio> Tag
The <audio> tag is used to embed sound content in a document, such as music or other audio streams.
The <audio> tag contains one or more <source> tags with different audio sources. The browser will
choose the first source it supports.
There are three supported audio formats in HTML: MP3, WAV, and OGG.
MP3 stands for MPEG Audio Layer 3, a digital audio coding format that compresses and stores audio.
<audio controls>
<source src="horse.mp3" type="audio/mpeg">
</audio>
Attribute Description
autoplay Specifies that the audio will start playing as soon as it is ready
controls Specifies that audio controls should be displayed (such as a play/pause button etc)
loop Specifies that the audio will start over again, every time it is finished