Exam 98-383: Introduction to Programming using HTML and CSS/Present Multimedia Using HTML
This lesson covers HTML multimedia presentation.[1]
Readings
editConstruct and analyze markup that displays images
editIncludes img and picture elements and their attributes.
img
editThe HTML <img>
element embeds an image into the document.[2]
Examples:
<img src="example.png" alt="Alternate text">
<img src="example.svg" alt="Alternate text" width="256" height="256">
<a href="linked_page.html"><img src="example.jpg" alt="Alternate text"></a>
picture
editThe HTML <picture>
element serves as a container for zero or more <source> elements and one <img> element to provide versions of an image for different display device scenarios.[3][4]
Example:
<picture>
<source srcset="wide.png" media="(min-width: 600px)">
<source srcset="normal.png" media="(min-width: 450px)">
<img src="narrow.png" alt="Alternate text">
</picture>
Describe the appropriate use of the img, svg, and canvas elements
editIncludes img, svg, and canvas elements.
Construct and analyze markup that plays video and audio
editIncludes video; audio; track; source; simple iframe implementations.
video
editThe HTML <video>
element is used to embed video content in a document.[8]
Examples:
<video src="video.webm" poster="image.jpg">
Your browser doesn't support embedded videos,
but you may <a href="video.webm">download</a> it instead.
</video>
<video src="video.webm" poster="image.jpg" width="640" height="360" autoplay controls>
Your browser doesn't support embedded videos,
but you may <a href="video.webm">download</a> it instead.
</video>
audio
editThe HTML <audio>
element is used to embed sound content in documents.[9][10]
Examples:
<audio src="audio.mp3">
Your browser doesn't support embedded audio.
</audio>
<audio src="audio.mp3" autoplay controls loop>
Your browser doesn't support embedded audio.
</audio>
track
editThe HTML <track>
element is used as a child of the media elements <audio> and <video> to specify timed text tracks such as subtitles or closed-captioning.[11][12]
Example:
<video src="video.webm" poster="image.jpg">
<track src="subtitles_en.vtt" kind="subtitles" srclang="en" label="English">
<track src="subtitles_es.vtt" kind="subtitles" srclang="es" label="Spanish">
Your browser doesn't support embedded videos,
but you may <a href="video.webm">download</a> it instead.
</video>
The attribute srclang is required if kind="subtitles"
source
editThe HTML <source>
element specifies multiple media resources for a <picture>, <audio>, or <video> element.[13]
Example:
<video>
<source src="video.webm" type="video/webm">
<source src="video.ogg" type="video/ogg">
<source src="video.mov" type="video/quicktime">
Your browser doesn't support embedded videos.
</video>
iframe
editThe HTML <iframe>
element represents a nested browsing context, effectively embedding another HTML page into the current page.[14][15][16]
Examples:
<iframe width="420" height="315"
src="https://www.youtube.com/embed/VideoIdGoesHere">
</iframe>
<iframe name="iframe" src="some_page.htm"></iframe>
<p><a href="another_page.htm" target="iframe">insert a different page</a></p>
See Also
editReferences
edit- ↑ Microsoft: Exam 98-383 Introduction to Programming using HTML and CSS
- ↑ Mozilla: img
- ↑ Mozilla: picture
- ↑ W3Schools: HTML picture Tag
- ↑ Mozilla: img
- ↑ Mozilla: svg
- ↑ Mozilla: canvas
- ↑ Mozilla: video
- ↑ Mozilla: audio
- ↑ W3Schools: HTML audio loop Attribute
- ↑ Mozilla: track
- ↑ W3Schools HTML track Tag
- ↑ Mozilla: source
- ↑ Mozilla: iframe
- ↑ W3Schools: HTML YouTube Videos
- ↑ [https://www.w3schools.com/html/html_iframe.asp W3Schools: HTML iframes