Home | | Computer Applications 11th std | Adding Video and Sound - HTML

Chapter: 11th Computer Applications : HTML - Adding multimedia elements and Forms

Adding Video and Sound - HTML

Video and Sound are the core part of the modern web pages.

Adding Video and Sound

 

Video and Sound are the core part of the modern web pages. In HTML, a video or audio content may be included as Inline or external data. The inline refers to audio or video files are handled as part of the page. These media files play the audio or video when the page is visible in the browser window. The external refers, linking external audio or video files as url.

The <embed> tag is used to attach an audio or video file easily within webpage. This tag includes the controls of the multimedia automatically in the browser. The <noembed> tag may be used as an alternate to display some other media file, in the case of the browser does not support <embed> tag.

Src is the primary attribute used with <embed> tag. The src attribute used to specify the name of the media file with its source location. Other attributes such as alt, height, width and align are used as it is used with <img>.

 

General Format:

<embed src = audio / video file name with location> </embed>

 

Illustration 12.5: An HTML code to demonstrate adding audio and video files (internal source)

<html>

<head>

        <title> Adding Multimedi Files </title>

</head>

<body>

        <img src="D:\Images\TN_Logo.png" alt="Govt. of Tamilnadu Logo" height=25% width=15%>

        <marquee> Welcome to <b> The State Council of Educational Research and Traning </b>, Tamilnadu </marquee>

        <embed src="D:\CS_Videos\CS_Video.mp4" width=50% height=50%> </embed>

</body>

</html>

The output will be:


 

Background music:

 

Music can be played in the background to a webpage, while the page is viewed. This is known as ‘inline’ sound or movie. The <bgsound> tag is used to attach an inline sound file in HTML. The src attribute is used to define the location of the media file. Volume attribute used to adjust volume control. The loop attribute defines the duration of play. The ‘infinite’ value causes the audio play as long as the page is in view.

 

General Format:

<bgsound src=music file name with location>

 

Illustration 12.6: An HTML code to demonstrate inline sound

<html>

<head>

<title> Inline Sound </title>

</head>

<body>

        <img src="D:\Images\TN_Logo.png" alt="Govt. of Tamilnadu Logo" height=25% width=15%>

        <marquee> Welcome to <b> The State Council of Educational Research and Training </b>, Tamilnadu </marquee>

        <bgsound src="D:\CS_Videos\Tamil Thai Vazhthu.mp3" loop=infinite> </body>

</html>


Study Material, Lecturing Notes, Assignment, Reference, Wiki description explanation, brief detail
11th Computer Applications : HTML - Adding multimedia elements and Forms : Adding Video and Sound - HTML |


Privacy Policy, Terms and Conditions, DMCA Policy and Compliant

Copyright © 2018-2023 BrainKart.com; All Rights Reserved S21. Developed by Therithal info, Chennai.