HTML and CSS Reference
In-Depth Information
Video and Audio
Adding videos to your webpage is useful when you have a v-log or a YouTube channel and
want to display the content on your webpage. To do this the video tag element:
<video controls>
<source src=”movie.mp4” type=”video/mp4”>
</video>
The video type mostly reflects what kind of file you are using, for example, here I am using
an mp4 video, so the video type is set to video/mp4. You can also use height and width
attributes to align and position your video on your website.
<video height=“240px” width=“300px” controls>
<source src=“movie.mp4” type=“video/mp4”>
</video>
Audio files can be added using a similar method.
<audio controls>
<source src=“music.mp3” type=”audio/mp3”>
</audio>
Search WWH ::




Custom Search