HTML Multimedia

HTML Multimedia (HTML多媒体)

Multimedia is almost anything you can hear or see (e.g. sound, music, images, records, videos, films, animations, etc.). It comes in different formats. Web pages can contain multimedia elements of different formats and types. (多媒体几乎是您可以听到或看到的任何内容(例如声音、音乐、图像、唱片、视频、电影、动画等)。它有不同的格式。网页可以包含不同格式和类型的多媒体元素。)

Multimedia Tags

Multimedia Tags (多媒体标签)

HTML allows adding different multimedia files on your website by various multimedia tags. These tags include:

  • <audio> for displaying a audio file on the web page,

  • <video> for displaying a video file on the web page,

  • <embed> for embedding multimedia files on the web page,

  • <object> for embedding multimedia files on the web page.

  • <iframe> for embedding other web pages.

Multimedia Formats

Multimedia Formats (多媒体格式)

Multimedia elements such as audio or video are stored in media files. You can discover the file type by looking at the file extension. (音频或视频等多媒体元素存储在媒体文件中。您可以通过查看文件扩展名来发现文件类型。)

Multimedia files have formats and different extensions: .mp3, .mp4, .mpg, .swf, .wav, .mpg, .wmv, and .avi.

Audio Formats

Audio Formats (音频格式)

The newest format for compressed recorded music is MP3. This term is synonymous with digital music. (压缩录制音乐的最新格式是MP3。这个词是数字音乐的代名词。)

MP3 is a good choice if your website is about recorded music. (如果您的网站是关于录制音乐的, MP3是一个不错的选择。)

FormatFileDescription
MIDI(Musical Instrument Digital Interface)..mid.midiThis is the main format for all electronic music devices (e.g. synthesizers and PC sound cards). MIDI files contain digital notes that can be played by electronics, but they do not include sound.
It plays well on music hardware and computers, but not in web browsers.
RealAudio.rm.ramAllows streaming of audio with low bandwidths. In web browsers, it does not play.
WMA.wmaThis format has been developed by Microsoft and is usually used in music players.
It plays well on Windows computers, but not in web browsers.
AAC.aacThis format has been developed by Apple as the default format for iTunes.
It plays well on Apple computers, but not in web browsers.
WAV.wavThis format has been developed by IBM and Microsoft.
It plays well on Windows, Linux, and Macintosh operating systems. Supported by HTML5.
Ogg.oggThis format has been developed by the Xiph.Org Foundation. Supported by HTML5.
MP3.mp3This is the most popular format for music players. The format has good compression (small files) and high quality. Supported by all browsers.
MP4.mp4This is a video format but can be used for audio as well. MP4 video is the future video format on the internet leading to automatic support for MP4 audio by all browsers.

Only WAV, MP3, and Ogg audio formats are supported by the HTML5 standard. (> HTML5标准仅支持WAV、MP3和OGG音频格式。)

Video Formats

Video Formats (生成与大多数移动和HTML5兼容的浏览器兼容的额外视频格式)

FormatFileDescription
MPEG.mpg.mpegThis format has been developed by the Moving Pictures Expert Group. It is the first popular video format on the web. Not supported in HTML5.
AVI(Audio Video Interleave).aviThis format has been developed by Microsoft. It is normally used in TV hardware and video cameras.
It plays well on Windows computers, but not in web browsers.
WMV(Windows Media Video).wmvThis format has been developed by Microsoft. It is normally used in TV hardware and video cameras.
It plays well on Windows computers, but not in web browsers.
QuickTime.movThis format has been developed by Apple.
It is normally used in TV hardware and video cameras. It plays well on Apple computers, but not in web browsers.
RealVideo.rm.ramThis format has been developed by Real Media and allows video streaming with low bandwidths. It is still used for Internet TV and online video but does not play in web browsers.
Flash.swf.flvThis format has been developed by Macromedia. It often requires a plug-in to play in web browser.
OggTheora Ogg.oggThis format has been developed by the Xiph.Org Foundation. Supported by HTML5.
WebM.webmThis format has been developed by Mozilla, Opera, Google, and Adobe. Supported by HTML5.
MPEG-4or MP4.mp4This format has been developed by the Moving Pictures Expert Group. It is generally used in TV hardware and newer video cameras. Recommended by YouTube. Supported by all HTML5 browsers.

Only WebM, MP4, and Ogg video formats are supported by the HTML5 standard. (> HTML5标准仅支持WebM、MP4和Ogg视频格式。)

Browser Support

Browser Support (浏览器支持)

Audio, video and animation have been treated differently by the major browsers. They support different formats, but some formats require plug-ins to work. (音频、视频和动画受到各大浏览器的不同对待。它们支持不同的格式,但有些格式需要插件才能工作。)

With HTML5, multimedia will be handled easier in the future. (借助HTML5 ,多媒体将来可以更轻松地处理。)



请遵守《互联网环境法规》文明发言,欢迎讨论问题
扫码反馈

扫一扫,反馈当前页面

咨询反馈
扫码关注
返回顶部