Easy Tutorial
❮ Att Tbody Align Att Basefont Face ❯

HTML <source> src Attribute

HTML <source> Tag

Example

An audio player with two source files. The browser should choose which file to use if it supports both:


Browser Support

Internet Explorer 9+, Firefox, Opera, Chrome, and Safari support the src attribute.

Note: Internet Explorer 8 and earlier versions do not support the <source> tag.


Definition and Usage

The src attribute specifies the URL of the media file to be played.


Differences Between HTML 4.01 and HTML5

The <source> tag is new in HTML5.


Syntax

Attribute Values

Value Description
URL Specifies the URL of the media file. Possible values: Absolute URL - points to another website (e.g., href="http://www.example.com/horse.ogg")<br> Relative URL - points to a file within the website (e.g., href="horse.ogg")

❮ Att Tbody Align Att Basefont Face ❯