Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
+2 votes
17.5k views
in Computer by (32.0k points)
closed by

Write suitable HTML Code to Embed audio and video in a webpage.

2 Answers

+1 vote
by (15.1k points)
selected by
 
Best answer

To embed audio in HTML:

We use the <audio> tag. Before HTML5, audio cannot be added to web pages in the Internet Explorer era. To play audio, we used web plugins like Flash. After the release of HTML5, it is possible. This tag supports Chrome, Firefox, Safari, Opera, and Edge in three audio formats – MP3, WAV, OGG.

Syntax

<audio>
    <source src="file_name" type="audio_file_type">
</audio>

To embed video in HTML:

We use the <video> tag. It contains one or more video sources at a time using <source> tag. It supports MP4, WebM, and Ogg in all modern browsers.

Syntax

<video>
    <source src="file_name" type="video_file_type">
</video>
+5 votes
by (33.2k points)

HTML Code for Embedding Video : 

<video controls><source src = "VideoFile.mp4"></video>

HTML Code for Embedding Audio :

<Audio controls><source src = "AudioFile.mp3"></Audio>

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...