Level no.8

 Lecture no.8

In this lecture we will study how to upload audio in html. The procedure is same as video.

 In this the attributes are also  used.

How to use audio tag in html ?

We use audio tag to upload music or other audio streams.

<audio src=""></audio>. In audio tag the alt attribute is used.

Code:
<audio src="link of a audio " > </audio>.

In this src specifies thr URL of the audio.

Example:
<!DOCTYPE html>
<html>
<head> 
<title> Uploading audio </title>
</head>
<body>
<p>
<audio src="audio1.opus "  controls  ></audio>
</p>
</body>
</html>

In this example controls is used to display audio such play/pause button etc.

Output:

Audio will be uploaded.
____________________________________________________

Code with Loop Attribute:

<!DOCTYPE html>
<html>
<head> 
<title> Uploading audio </title>
</head>
<body>
<p>
<audio src="audio1.opus "  controls  loop ></audio>
</p>
</body>
</html>
 
In this the loop attribute plays audio start over again, every time it get finished. 

_______________________________________________________



Code with Muted  Attribute:

<!DOCTYPE html>
<html>
<head> 
<title> Uploading audio </title>
</head>
<body>
<p>
<audio src="audio1.opus "  controls muted   ></audio>
</p>
</body>
</html>

In muted attribute the audio  is muted.

____________________________________________________


Code with Autoplay Attribute:

<!DOCTYPE html>
<html>
<head> 
<title> Uploading audio </title>
</head>
<body>
<p>
<audio src="audio1.opus "  controls  autoplay ></audio>
</p>
</body>
</html>


In this attribute the audio  start playing as soon as it is ready.

_________________________________________________________


Code with Height  Attribute:

<!DOCTYPE html>
<html>
<head> 
<title> Uploading audio </title>
</head>
<body>
<p>
<audio src="audio1.opus "  controls  height="150 "></audio>
</p>
</body>
</html>
 
This  attribute  sets the height of the audio.
________________________________________________________


Code with Width  Attribute:

<!DOCTYPE html>
<html>
<head> 
<title> Uploading audio </title>
</head>
<body>
<p>
<audio src="audio1.opus "  controls  width ></audio>
</p>
</body>
</html>

This attribute sets the width of the audio.

______________________________________________

Abbreviation Tag 
The abbreviation tag defines the abbreviation of the words like CSS, HTML, Dr. and Mr.

Syntax:
<abbr title=""> </abbr>

Code:
<!DOCTYPE html>
<html>
<head>
<title>Abbreviation tag </title>
</head>
<body>
<p>

 <abbr title="hyper text markup language">HTML</abbr>.
</p>
</body>
<html>


Output:
hyper text markup language.

Link of Social Media Tag

To link social media tag the anchor tag is used.

Syntax:

<a href="link of social media icon ">name of social media icon</a>.The href attribute is used in it, href is hyper reference.


Code:
<!DOCTYPE html>
<html>
<head>
<title>Abbreviation tag </title>
</head>
<body>
<p>

 <abbr href="Link of social media icon" >name of social media icon </a>.
</p>
</body>
<html>

Output:

Facebook

In html the link is in purple color you  will click on it  and access it.






Comments

Post a Comment

Popular posts from this blog

Level no.4

Level no.21

Level no.3