Skip to main content

HTML Multimedia

HTML provides several multimedia elements that allow you to include various types of media content in your web pages, such as images, audio, and video.

Here are some of the most commonly used multimedia elements in HTML:

Images

  • <img>: Used to display images on a web page.

As an example:

<img src="image.jpg" alt="description of image" />

Audio

  • <audio>: Used to embed audio content on a web page.

As an example:

Editor

Loading...

Video

  • <video>: Used to embed video content on a web page.

Editor

Loading...
  • <source>: Used to specify alternative media resources for the <audio> and <video> elements. This is useful when you want to provide different formats of the same media file to support different browsers and devices.

As an example:

Editor

Loading...

Other Multimedia Elements

  • <iframe>: Used to embed external content, such as YouTube videos or Google Maps, on a web page.

As an example:

Editor

Loading...
  • <picture>: Used to provide multiple versions of an image with different resolutions and sizes to support different devices and screen sizes.

As an example:

Editor

Loading...

Common Video Formats

Format NameFile TypeDescription
MP4.mp4MPEG-4 Part 14, a widely used video format that provides high quality video with good compression, making it a popular choice for streaming and online video.
AVI.aviAudio Video Interleave, a video format that was introduced by Microsoft in the 1990s. It provides high quality video and audio but has a larger file size compared to newer formats.
MOV.movQuickTime File Format, a video format developed by Apple that is commonly used for videos captured on iPhones and iPads. It provides high quality video and audio, but can have a larger file size compared to some other formats.
WMV.wmvWindows Media Video, a video format developed by Microsoft that is commonly used for streaming video. It provides good quality video with relatively small file sizes.
FLV.flvFlash Video, a video format that was widely used for online video before HTML5 video became popular. It provides good quality video with small file sizes, but requires a Flash player to play the video.
MKV.mkvMatroska Multimedia Container, a free and open-source video format that supports high quality video and audio, as well as subtitles and multiple audio tracks. It is a popular choice for video enthusiasts and provides good compression.
WebM.webmA free and open-source video format developed by Google that is designed to provide high quality video with smaller file sizes for web streaming. It is becoming increasingly popular for online video.
MPEG.mpegMoving Picture Experts Group, a family of video formats that includes MPEG-1, MPEG-2, and MPEG-4. These formats provide high quality video with good compression, but have larger file sizes compared to some other formats.
3GP.3gp3rd Generation Partnership Project, a video format commonly used for videos captured on mobile phones. It provides relatively small file sizes but lower quality video compared to some other formats.
OGG.oggOgg container format, a free and open-source format that can include video, audio, and other data. It is designed to provide high quality video and audio with good compression, making it a popular choice for web streaming.

Common Audio Formats

Format NameFile TypeDescription
MP3.mp3MPEG-1 Audio Layer III, a widely used audio format that provides good sound quality with relatively small file sizes, making it a popular choice for music and audio streaming.
WAV.wavWaveform Audio File Format, a high-quality uncompressed audio format that is commonly used for music production and editing. It provides excellent sound quality but has larger file sizes compared to some other formats.
FLAC.flacFree Lossless Audio Codec, an open-source audio format that provides high-quality sound without any loss in quality. It is a popular choice for audiophiles and music enthusiasts who want to preserve the original sound quality.
AIFF.aiffAudio Interchange File Format, a high-quality uncompressed audio format that is commonly used in music production and editing on Apple devices. It provides excellent sound quality but has larger file sizes compared to some other formats.
AAC.aacAdvanced Audio Coding, a popular audio format that provides high-quality sound with good compression, making it a popular choice for music and audio streaming. It is commonly used in iTunes and other Apple devices.
OGG.oggOgg container format, a free and open-source format that can include audio, video, and other data. It is designed to provide high-quality sound with good compression, making it a popular choice for web streaming.
WMA.wmaWindows Media Audio, an audio format developed by Microsoft that is commonly used for streaming audio. It provides good quality sound with relatively small file sizes.
ALAC.m4aApple Lossless Audio Codec, a lossless audio format developed by Apple that provides high-quality sound without any loss in quality. It is commonly used in iTunes and other Apple devices.
DSD.dsdDirect Stream Digital, a high-quality audio format used for Super Audio CDs (SACDs) that provides excellent sound quality. It is becoming increasingly popular among audiophiles and music enthusiasts.