HTML and CSS Reference
In-Depth Information
Thus, the great problem with embedded objects is that they rely on each user to have
a certain piece of software installed in addition to a Web browser. One goal of introduc-
ing multimedia support in HTML5 was to avoid this problem by making the insertion of
audio and video content as easy and seamless as inserting inline images.
The Long Journey of the <embed> Tag
The < embed> tag originally was introduced by the Netscape browser in the 1990s as
a way of embedding multimedia content and external programs. At the same time,
Internet Explorer was attempting to do the same thing with its own object element.
Ultimately, the object element (which you'll learn more about in the next session) was
adopted as the HTML 4 standard and the embed element never became part of any
HTML specification.
That should have ended the embed element; however, the way that Internet Explorer
employed the object element was inconsistent with other browsers. That meant that
cumbersome workarounds were required to create multimedia code that would work
across all browsers. The most popular workaround involved nesting an embed element
within an object element because even though it wasn't part of any official HTML
specification, every browser still supported the embed element. However, if a developer
wanted to write XHTML code, such workarounds were not allowed because the embed
element could not be used at all, and so even more complicated solutions were sought.
Into this mess entered HTML5 with the guiding principle that the specifications for
the new language should reflect how HTML is used in the browser community. Based on
that consideration, HTML5 included the embed element as a legitimate HTML element.
Of course, as HTML5 gains broader acceptance on the Web and elements such as the
audio element gain acceptance, the need for the embed element will fade, just at the
point when it gained legitimacy.
Maxine is pleased with your work on the overture.mp3 sound clip. In the next session,
you'll use the same techniques to embed a video clip in her Web page.
Session 7.1 Quick Check
1. Define the terms bandwidth , sampling rate , sample resolution , and bit rate .
2. What are the three audio formats supported by current browsers that support
HTML5?
3. Provide the HTML code to create an audio clip for the royal.mp3 and royal.ogg
audio files. Give users control over playing the audio clip.
4. Provide the HTML code to play the audio clip soundtrack.mp3 as a background
sound that plays continuously when the page is opened by a browser.
5. What is the MIME type for a WAV file?
6. Provide the HTML code to insert the royal.mp3 file using the embed element.
Display controls for the embedded object and have it start automatically when
the page loads, beginning 5 seconds into the clip.
Search WWH ::




Custom Search