English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Basic Tutorial

HTML media

HTML reference manual

HTML5 Basic Tutorial

HTML5 API

HTML5 Media

HTML Media (Media)

Multimedia comes in many different formats. It can be any content you hear or see, such as text, images, music, sound effects, recordings, movies, animations, and so on

HTML multimedia

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

Modern web browsers support many multimedia formats.

What is multimedia?

Multimedia comes in many different formats. It can be any content 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, as 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 color. Subsequently, browsers that supported colors, fonts, and text styles were born, and image support was also added.

Different browsers handle support for sound effects, animations, and videos 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 formats

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

The most common method to determine the media type is to check the file extension. When a browser receives the file extension .htm or .html, it assumes 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 as well as .mp4.

Video format

MP4It is a new video format launched on the Internet.
YouTube recommends using MP4 .
Flash Players support MP4
HTML5 Supports MP4.

FormatFileDescription
AVI.aviThe AVI (Audio Video Interleave) format was developed by Microsoft. All computers running Windows support the AVI format. It is a common format on the Internet, but non-Windows computers do not always play it.
WMV.wmvThe Windows Media format was developed by Microsoft. Windows Media is common on the Internet, but Windows Media movies cannot be played without installing additional (free) components. Some later Windows Media movies cannot be played on all non-Windows computers due to the lack of appropriate players.
MPEG
  • .mpg

  • .mpeg

The 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.movThe 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

The 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

The Flash (Shockwave) format was developed by Macromedia. The Shockwave format requires additional components to play. However, these components are pre-installed in browsers such as Firefox or IE.
Mpeg-4.mp4Mpeg-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. More and more video publishers are turning to MP4, as Flash players and HTML5 of the Internet shared format.

audio format

MP3is an audio compression technology, with the full name being Motion Picture Experts Group Audio Compression Standard.3(Moving Picture Experts Group Audio Layer III),shortened as MP3. It is designed to greatly reduce the amount of audio data. If your site is a music type, you can choose mp3Format.

FormatFileDescription
MIDI
  • .mid

  • .midi

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

because the MIDI format only contains instructions, MIDI files are extremely small. The example above only 23k in size, but 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 its priority on low bandwidth, the quality is often reduced.
Wave.wavWave (waveform) format was developed by IBM and Microsoft. All computers running Windows and all web browsers (except Google Chrome) support it.
WMA.wmaWMA format (Windows Media Audio), with quality superior to MP3, compatible with most players except iPod. WMA files can be transmitted as a continuous data stream, making it very practical for internet radio or online music.
MP3
  • .mp3

  • .mpga

MP3 The file is actually the audio part of the MPEG file. The MPEG format was originally developed by the Moving Picture Experts Group.3 It is one of the most popular audio formats for music. It is expected that future software systems will support it.

HTML5 Latest standard support  MP3, WAV, and Ogg audio formats.