Skip to content
Learn Netverks

Lesson

Step 46/58 79% through track

media

Media overview

Last reviewed May 28, 2026 Content v20260528
Track mode
iframe_html
Means
HTML preview sandbox
Reading
~2 min
Level
intermediate

This lesson

This lesson teaches Media overview—the ideas, syntax, and habits you need before moving on in HTML.

Without a solid grasp of Media overview, you will repeat mistakes in HTML exercises and on real pages or scripts.

You will apply Media overview in contexts like: Hero sections, articles, galleries, and social preview cards.

Read the lesson, edit HTML/CSS in the playground, press Run to preview, then answer the lesson MCQs. Also use the HTML reference desk when you need tag or attribute lookup.

Toward the end of the track—use it to consolidate patterns before the capstone or summary lessons.

Audio and video share patterns: container elements, nested source candidates, optional track elements for timed text, and fallback markup for unsupported scenarios.

Codec landscape

  • Video: commonly AV1/VP9/H.264 depending on licensing and hardware.
  • Audio: AAC, Opus, MP3 legacy.
  • Always supply alternatives—no single codec plays everywhere.

Tracks

  • kind="subtitles" translation assistance.
  • kind="captions" includes sound effects for deaf users.
  • kind="descriptions" deliver audio descriptions for visual action.

Fallback content

Place paragraph text or download links between opening/closing media tags for browsers without codec support.

Licensing + autoplay policy

Unmuted autoplay is largely blocked—marketing “hero videos” should not assume sound; captions remain mandatory ethically and often legally.

Track kind values

kindPurpose
subtitlesTranslation of dialogue (may omit non-speech audio).
captionsIncludes sound effects & speaker IDs for deaf/hard-of-hearing users.
descriptionsTextual description of important visuals (often read in gaps).
chaptersNavigation markers in the timeline.
metadataMachine-oriented cues (rare in hand-authored pages).

Example — dual source codecs

<video controls width="640" height="360" poster="/cover.jpg">
  <source src="/clip.webm" type="video/webm">
  <source src="/clip.mp4" type="video/mp4">
  <p><a href="/clip.mp4">Download MP4</a></p>
</video>

Browser picks the first playable source; always provide a download fallback.

Important interview questions and answers

  1. Q: Why should video/audio include fallbacks and tracks?
    A: Codec support differs by browser and captions/transcripts are essential for accessibility and compliance.
  2. Q: When is inline SVG better than bitmap icons?
    A: For scalable, styleable, lightweight icons that inherit CSS and remain sharp across densities.
  3. Q: What is a common embed risk with third-party iframes?
    A: Privacy/performance overhead and policy issues; lazy-load and apply consent/security constraints where needed.

Tip: Always include captions/transcripts for video when speech carries information.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • What confused you about this lesson?
  • How would you explain this to a teammate in 30 seconds?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump