Different ways to add media in HTML page Last Updated : 30 Jan, 2022 Summarize Comments Improve Suggest changes Share Like Article Like Report These days one of the most important things on the web is media. So all the developers and websites owners want to make their websites attractive and interactive. For they need to include media in their sites. There are lots of media types, audio, video, etc. There are different ways to include those media into the websites. Each type of media required a specific way. All the possible ways are mentioned and described below one by one. Different ways to add media to the HTML page: Using HTML Audio tag: This tag is used to include the audio media type into the websites.Using HTML Video tag: This tag is used to include the video media type into the websites. Example 1: Below example illustrate adding audio media type into the HTML page. The developer can use their own src file for implementation. HTML <!DOCTYPE html> <html> <body> <p>Audio Sample</p> <!-- Audio tag starts here --> <audio controls> <source src="test.mp3" type="audio/mp3"> <source src="test.ogg" type="audio/ogg"> </audio> <!-- Audio tag ends here --> </body> </html> Output: Using HTML Audio tag Example 2: Below example illustrate adding video media type into the HTML page. HTML <!DOCTYPE html> <html> <body> <center> <h1 style="color:green;"> GeeksforGeeks </h1> <h3>HTML video tag</h3> <p>Adding video on the webpage <p> <video width="450" height="250" controls preload="auto"> <source src= "https://media.geeksforgeeks.org/wp-content/uploads/20190616234019/Canvas.move_.mp4" type="video/mp4"> <source src= "https://media.geeksforgeeks.org/wp-content/uploads/20190616234019/Canvas.move_.ogg" type="video/ogg"> </video> </center> </body> </html> Output: Using HTML Video tag Comment More infoAdvertise with us Next Article Different ways to add media in HTML page S skyridetim Follow Improve Article Tags : HTML HTML-Tags HTML-Questions Similar Reads What are the media element tags introduced by HTML5 ? HTML5 introduced 5 most popular media element tags i.e. <audio>, <video>, <source>, <embed>, <track>. These media element tags changed the entire development using HTML. In this article, you will get to know about these five media element tags briefly.Media Tags:Media T 3 min read HTML DOM Link media Property The HTML DOM link media property is used to set or return the value of the media attribute of an <link> element. The media attribute is used to specify what type of media devices the target resource is optimized. Syntax: It is used to return the media property. linkObject.media; It is used to 1 min read How to Add Image in HTML Table ? Adding images to an HTML table can enhance the visual appeal and functionality of your webpage. Whether it is for displaying product images in an e-commerce website or adding profile pictures in a user list, images in tables are a common requirement. In this article, we will explore two methods to a 2 min read How to Add GIF in HTML? GIFs (Graphics Interchange Format) are the popular image format that supports both animated and static images. Adding the GIFs to the HTML document enhances the visual appeal and the user interaction of the web pages. They are commonly used for loading animations, fun illustrations, or visual explan 2 min read How to Add GIF in HTML? GIFs (Graphics Interchange Format) are the popular image format that supports both animated and static images. Adding the GIFs to the HTML document enhances the visual appeal and the user interaction of the web pages. They are commonly used for loading animations, fun illustrations, or visual explan 2 min read Like