TutorialLab
HTML Media Tags

HTML Media Embed Tags Usage

HTML Media Embed Tags Usage:

Today we will  learn HTML Media Embed Tags Usage and we will discuss how to insert image, audio and video into your webpage in HTML. Also we will learn how to use iframe tag iframe tag is used for to embed another website or some specific area/part of another website into our website.

Image:

We can insert image into our webpage using <img> tag.This tag take some attributes which is ‘src’ , ‘alt’ , ‘height’ ,’width’ and ‘title’.<img> is singular tag.

AttributesDescription
srcSpecifies the URL of an image
heightSpecifies the height of an image
widthSpecifies the width of an image
altSpecifies an alternate text for an image
titleSpecifies Title of an image which is show when mouse hover to image
<img src='abc.jpg' width='400px' height='300px' alt='this is test image' title='My Image'>

Audio:

We can add audio file to our webpage using <audio> tag. This tag take many attributes but ‘controls’ is required attribute we must have to add ‘controls’ attribute in audio tag.

<audio controls>
<source src='abc.mp3'>
</audio>

Video:

We can add video file to our webpage using <video> tag. This tag take many attributes but ‘controls’ is required attribute we must have to add ‘controls’ attribute in video tag.

<video width="320" height="240" controls>
<source src="abc.mp4">
</video>

Iframe:

Iframe tag is used for to embed another website or some specific area/part of another website into our website. ‘scrolling=no’ attribute is used to remove scrollbar from embed area.

<iframe src="https://www.uswat.edu.pk" width="500" height="400" border="none" scrolling="no"></iframe>

Previous Lecture

Aizaz Ali

Follow us

Don't be shy, get in touch. We love meeting interesting people and making new friends.