Media on the web refers to sound, music, video, and animations.
Modern web browsers support many media formats.
What is Media?
Media comes in different formats. It can be anything you can hear or see, such as text, images, music, sound, recorded speech, movies, animations, etc.
On the Internet, you will often find media elements embedded in web pages. Modern browsers support a variety of media formats.
In this tutorial, you will learn about different media formats and how to use them in your web pages.
Browser Support
The first internet browser supported only text, and even that was limited to a single font and color. Subsequently, browsers supporting colors, fonts, and text styles were developed, and image support was added.
Different browsers handle support for sounds, 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 sections.
Media Formats
Formats - Media elements like videos and audio are stored in media files.
The most common way to determine the type of media is by looking at the file extension. When a browser gets a file extension of .htm or .html, it assumes the file is an HTML page. An .xml extension indicates an XML file, and a .css extension indicates a stylesheet. Image formats are recognized by .gif or .jpg.
Media elements also have file formats with different extensions, such as .swf, .wmv, .mp3, and .mp4.
Video Formats
MP4 is a new video format introduced on the Internet.
YouTube recommends using MP4.
Flash Players support MP4.
HTML5 supports MP4.
| Format | File | Description |
|---|---|---|
| AVI | .avi | 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 not all non-Windows computers can always play it. |
| WMV | .wmv | Windows Media format was developed by Microsoft. Windows Media is very 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 because there is no appropriate player. |
| MPEG | *.mpg *.mpeg | MPEG (Moving Pictures Expert Group) format is the most popular format on the Internet. It is cross-platform and is supported by all the most popular browsers. |
| QuickTime | .mov | QuickTime format was developed by Apple. QuickTime is a very 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, web TV). Because 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 on 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 receives multiple formats and converts them all to .flv or .mp4 for distribution. More and more video publishers are moving to MP4 as the Internet sharing format for Flash players and HTML5. |
| The latest HTML5 standard only supports MP4, WebM, and Ogg video formats. |
Sound Formats
MP3 is an audio compression technology, which stands for Moving Picture Experts Group Audio Layer III, abbreviated as MP3. It was designed to drastically reduce the amount of audio data. If your site is music-oriented, you can choose the mp3 format.
| Format | File | Description |
|---|---|---|
| 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 they contain digital music instructions that can be played by electronics (such as sound cards). Click here to play The Beatles. Because the 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 is supported by a large number of software on a wide range of 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. This format allows audio streaming under low-bandwidth conditions (online music, web radio). Because it prioritizes 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) has better quality than MP3 and is compatible with most players, except for iPod. WMA files can be transmitted as continuous data streams, making it very practical for web 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 Motion Picture Experts Group. MP3 is the most popular audio format for music. It is expected that future software systems will support it. |
| The latest HTML5 standard supports MP3, WAV, and Ogg audio formats. |
YouTip