Skip to content
Learn Netverks

Lesson

Step 47/58 81% through track

video

Video

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

This lesson

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

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

You will apply Video 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.

When intermediate lessons feel comfortable and you are ready for production-style trade-offs.

The <video> element streams visual media with optional audio tracks.

<video controls width="1280" height="720" poster="/talk-cover.jpg" preload="metadata">
  <source src="/talk.webm" type="video/webm">
  <source src="/talk.mp4" type="video/mp4">
  <track kind="captions" src="/talk-en.vtt" srclang="en" label="English">
  <p><a href="/talk.mp4">Download the MP4</a>.</p>
</video>

Attributes

  • controls: expose native UI (custom skins require full accessibility parity).
  • poster: preview frame before playback.
  • muted/playsinline: influence autoplay policies on mobile.
  • preload: hints (none, metadata, auto)—honor bandwidth budgets.

Captions

Provide WebVTT tracks for spoken content; laws and policies increasingly require captions for public media.

Streaming vs static files

Adaptive streaming (HLS/DASH) typically relies on JavaScript players—HTML alone serves progressive downloads.

Live demo — sample file (CC0 from MDN)

Requires network; uses a short open clip for learning.

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.

Pitfall: Autoplay with sound harms UX—respect muted and user preferences.

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