Skip to main content

html-tags.com

<source>

A media resource candidate inside picture, audio, or video.

Baseline: Widely available · Media & embedded content

When to use it

One per format or condition, ordered best-first; the browser takes the first it supports.

When not to

Only valid inside picture, audio, or video; it renders nothing on its own.

Key attributes

srcset / src
the resource
type
MIME type
media
condition (picture only)

Example

<video controls width='320' height='180'>
  <source src='/media/intro.webm' type='video/webm'>
  <source src='/media/intro.mp4' type='video/mp4'>
</video>
Source — this snippet needs a fuller context to render.

Authoritative references