HTML Multimedia

Multimedia on the Web refers to sound, music, video, and animation.

Modern web browsers support many multimedia formats.

What is Multimedia?

Multimedia comes from a variety of different formats. It can be anything you hear or see, such as text, images, music, sound effects, recordings, movies, animations, and so on.

On the Internet, you will often find multimedia elements embedded in web pages, and modern browsers support a variety of multimedia formats.

In this tutorial, you will learn about different multimedia formats and how to use them on your web pages.

Browser Support

The first Internet browser only supported text, and even the support for text was limited to a single font and a single color. Later, browsers that supported color, font, and text styles were born, and image support was also added.

Different browsers handle support for sound, animation, and video in different ways. Some elements can be handled inline, while others require additional plugins.

You will learn more about plugins in the following chapters.

Multimedia Format

Multimedia elements (such as video and audio) are stored in media files.

The most common way to determine the media type is to check the file extension. When the browser receives the file extension .htm or .html, it assumes that the file is an HTML page. The .xml extension indicates an XML file, while the .css extension indicates a stylesheet. Image formats are identified by .gif or .jpg.

Multimedia elements also have file formats with different extensions, such as .swf, .wmv, .mp3, and .mp4.

Video Format

The MP4 format is a new and upcoming Internet video format. HTML5, Flash players, and video websites like Youku all support it.

Format File Description
AVI .avi The AVI (Audio Video Interleave) format is developed by Microsoft. All computers running Windows support the AVI format. It is a very common format on the Internet, but non-Windows computers do not always support it.
WMV .wmv The Windows Media format is developed by Microsoft. Windows Media is very common on the Internet, but it cannot be played without installing additional (free) components. Some later Windows Media movies cannot be played on all non-Windows computers because there are no suitable players.
MPEG
  • .mpg
  • .mpeg
MPEG (Moving Pictures Expert Group) format is the most popular format on the Internet. It is cross-platform and supported by all popular browsers.
QuickTime .mov QuickTime format was developed by Apple Inc. QuickTime is a common format on the Internet, but QuickTime movies cannot be played on Windows computers without installing additional (free) components.
RealVideo
  • .rm
  • .ram
RealVideo format was developed by Real Media for the Internet. This format allows video streaming under low bandwidth conditions (online video, Internet TV). Since it prioritizes low bandwidth, the quality is often reduced.
Flash
  • .swf
  • .flv
Flash (Shockwave) format was developed by Macromedia. Shockwave format requires additional components to play. However, this component is pre-installed in browsers like Firefox or IE.
Mpeg-4 .mp4 Mpeg-4 (with H.264 video compression) is a new format for the Internet. In fact, YouTube recommends using MP4. YouTube accepts multiple formats and then converts them all to .flv or .mp4 for distribution. An increasing number of video publishers are switching to MP4, using it as the Internet sharing format for Flash players and HTML5.

Sound Format

Format File Description
MIDI
  • .mid
  • .midi

MIDI (Musical Instrument Digital Interface) is a format designed for electronic musical devices (such as synthesizers and sound cards). MIDI files do not contain sound, but they contain digital music instructions that can be played by electronic products (such as sound cards).

Click here to play The Beatles

Because MIDI format only contains instructions, MIDI files are extremely small. The example above is only 23k in size, but it can play nearly 5 minutes. MIDI has been widely supported by a large number of software on various platforms. Most popular web browsers support MIDI.

RealAudio
  • .rm
  • .ram
RealAudio format was developed by Real Media for the Internet. This format also supports video. It allows audio streaming under low bandwidth conditions (online music, network music). Due to the priority of low bandwidth, the quality is often reduced.
Wave .wav Wave (waveform) format was developed by IBM and Microsoft. All computers running Windows and all web browsers (except Google Chrome) support it.
WMA .wma WMA format (Windows Media Audio), with better quality than MP3, compatible with most players except iPod. WMA files can be transmitted as a continuous data stream, making it practical for internet radio or online music.
MP3
  • .mp3
  • .mpga
MP3 files are actually the audio part of MPEG files. The MPEG format was originally developed by the Moving Picture Experts Group. MP3 is the most popular audio format for music. It is expected that future software systems will support it.

Which format to use?

WAVE is the most popular on the InternetUncompressedaudio format, supported by all popular browsers. If you need uncompressed audio (music or speech), then you should use WAVE format.

MP3 is the latestCompressionRecording Music Formats. The term MP3 has become synonymous with digital music. If your website deals with recorded music, then MP3 is an option.