Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

How to specify the URL of the media file in HTML5 ?

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Here we will see how to set the URL of a media file using HTML. To set the URL of media file we use <source> tag. This tag is used to attach multimedia files like audio, video and pictures. The <audio>, <video> and <picture> elements contain the <source> element.

Syntax:

<source src="" type="">
   // Statements
</source>

Example:

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>
        How to specify the URL of
        the media file in HTML5?
    </title>
</head>
  
<body style="text-align: center;">
    <h1 style="color:green;">
        GeeksforGeeks
    </h1>
  
    <h3>
        How to specify the URL of
        the media file in HTML5?
    </h3>
  
    <video width="400" height="350" controls>
        <source src=
            type="video/mp4">
    </video>
</body>
  
</html>

Output:

Supported Browsers:

  • Google Chrome 4.0
  • Internet Explorer 9.0
  • Firefox 3.5
  • Safari 4.0
  • Opera 10.5
My Personal Notes arrow_drop_up
Last Updated : 26 Mar, 2021
Like Article
Save Article
Similar Reads
Related Tutorials