Tutorials Logic, IN +91 8092939553 info@tutorialslogic.com
FAQs Support
Navigation
Home About Us Contact Us Blogs FAQs
Tutorials
All Tutorials
Services
Academic Projects Resume Writing Interview Questions Website Development
Compiler Tutorials

HTML Multimedia

HTML5 introduced native <audio> and <video> elements — no plugins like Flash needed.

HTML Video

Video Element
<!-- Basic video with controls -->
<video width="640" height="360" controls>
    <source src="movie.mp4" type="video/mp4">
    <source src="movie.webm" type="video/webm">
    Your browser does not support the video tag.
</video>

<!-- Autoplay, muted, loop (common for background videos) -->
<video autoplay muted loop playsinline
       style="width:100%; height:auto;">
    <source src="background.mp4" type="video/mp4">
</video>

<!-- With poster image (shown before video plays) -->
<video controls poster="thumbnail.jpg" width="640">
    <source src="tutorial.mp4" type="video/mp4">
</video>

Video Attributes

AttributeDescription
controlsShows play/pause/volume controls
autoplayStarts playing automatically (requires muted in most browsers)
mutedMutes the audio
loopRepeats the video
posterImage shown before the video plays
preloadauto, metadata, or none
width / heightDimensions in pixels

HTML Audio

Audio Element
<!-- Basic audio player -->
<audio controls>
    <source src="music.mp3" type="audio/mpeg">
    <source src="music.ogg" type="audio/ogg">
    Your browser does not support the audio element.
</audio>

<!-- Autoplay background music (muted by default in browsers) -->
<audio autoplay loop muted>
    <source src="background.mp3" type="audio/mpeg">
</audio>

Supported Formats

FormatTypeBrowser Support
MP4 (H.264)VideoAll major browsers
WebMVideoChrome, Firefox, Edge
OGGVideo/AudioFirefox, Chrome
MP3AudioAll major browsers
WAVAudioAll major browsers

Ready to Level Up Your Skills?

Explore 500+ free tutorials across 20+ languages and frameworks.