HTML Multimedia
Multimedia on the Web refers to sound effects, music, video, and animation.
Modern web browsers already support many multimedia formats.
What is Multimedia?
Multimedia comes in many different formats. It can be anything you hear or see: text, pictures, music, sound effects, recordings, movies, animations, and so on.
On the Internet, you will often find multimedia elements embedded in web pages. Modern browsers support a variety of multimedia formats.
In this tutorial, you will learn about different multimedia formats and how to use them in your web pages.
Browser support
The first Internet browsers supported only text, and even that support was limited to a single font and a single color. Later, browsers emerged that supported colors, fonts, and text styles, and image support was added as well.
Different browsers handle support for sound effects, animation, and video in different ways. Some elements can be handled inline, while others require additional plug-ins.
You will learn more about plug-ins in the following chapters.
Multimedia Formats
Format Multimedia elements (such as video and audio) are stored in media files.
The most common way to determine a media type is to look at the file extension. When a browser gets a file with the extension .htm or .html, it assumes the file is an HTML page. The .xml extension indicates an XML file, and the .css extension indicates a style sheet. 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 Formats
|
| MP4 is a new video format introduced for the Internet.
YouTube 推荐使用 MP4 。
Flash Players 支持 MP4
HTML5 支持 MP4。 |
| --- | --- |
| Format | file | Description |
|---|---|---|
| AVI | .avi | The AVI (Audio Video Interleave) format was developed by Microsoft. All computers running Windows support the AVI format. It is a very common format on the Internet, but non-Windows computers cannot always play it. |
| WMV | .wmv | The Windows Media format was developed by Microsoft. Windows Media is common on the Internet, but Windows Media movies cannot be played without additional (free) components installed. Some later Windows Media movies cannot be played on any non-Windows computer because no suitable player is available. |
| MPEG |
|
- .rm
- .ram
- .swf
- .flv
![]() |
The latest HTML5 standard supports only MP4, WebM, and Ogg video formats. |
|---|
Sound Formats
MP3 is an audio compression technology. Its full name is Moving Picture Experts Group Audio Layer III, abbreviated as MP3. It was designed to greatly reduce the amount of audio data. If your site is music-oriented, you can choose the mp3 format.
| Format | file | Description |
|---|---|---|
| MIDI |
|
MIDI (Musical Instrument Digital Interface) is a format for electronic musical devices (such as synthesizers and sound cards). MIDI files do not contain sound, but contain digital music instructions that can be played by electronic devices (such as sound cards).
Click here to play The Beatles。
Because the MIDI format contains only instructions, MIDI files are extremely small. The example above is only 23k in size but can play for nearly 5 minutes. MIDI is supported by a large amount of software on a wide range of platforms. Most popular web browsers support MIDI.
| | RealAudio |- .rm
- .ram
- .mp3
- .mpga
![]() |
The latest HTML5 standard supports MP3, WAV, and Ogg audio formats. |
|---|
