: The SOURCE Element
Last updated: 2026-09-12
<source>The SOURCE Element
Supplies media resources for audio, video or picture, allowing multiple variants for compatibility or responsiveness.
| Category | Links & Media |
|---|---|
| Content Model | Void element |
| Allowed Parents | Any element that accepts flow content |
| Content Tag | Self-closing — no closing tag needed |
| Status | Standard |
📝 Syntax
<source src="..." type="...">
⚙️ Attributes
This element supports the global attributes plus the following:
| Attribute | Value | Description |
|---|---|---|
src | Media resource URL. | |
type | MIME type of the resource, e.g. audio/mpeg. | |
media | Media query condition (used by picture for responsiveness). |
▶ Example
Edit the code below and see the live result in the playground:
🌐 Browser Support
| Browser | |||||
|---|---|---|---|---|---|
| <source> | ✓ v1 | ✓ v12 | ✓ v1 | ✓ v1 | ✓ v1 |
| Supported in all major browsers | |||||
Tip: source is a void element (no closing tag); the browser picks the first supported source.
🏷️ Related Tags
💡 Related Cases
More case studies coming soon — check back later.