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.
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.
|src||Specifies the URL of an image|
|height||Specifies the height of an image|
|width||Specifies the width of an image|
|alt||Specifies an alternate text for an image|
|title||Specifies 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'>
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>
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 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>