No.7#IMAGE tag in HTML
Insert picture your web page used tag <img> example:<img src="write picture name with extension" >like:-<img src="dog.jpg">
note:-image already save in your html folder.
The <img> tag has two required attributes:
- src - Specifies the path to the image
- alt - Specifies an the path not find
WAP:-
<html><head><title>insert img web page</title></head><body><img src="dog.jpg" width="300" height="300" alt="error" border="5"></body></html>
#Images Save in Another Folder or desktop
The <img> tag has two required attributes:
- src - Specifies the path to the image
- alt - Specifies an the path not find
If you have your images save in another folder or othe location , you must include the folder name or url,path set in the src attribute:
To use an image as a link, put the <img> tag inside the <a> tag:
WAP:
<html>
<head>
<title>image link</title>
</head>
<body>
<img src="dog.jpg" width="300" height="300">
</a>
</html>
#Animated Images
HTML allows animated GIFs:
<html>
<head>
<title>insert animated image</title>
</head>
<body>
<img src="programming.gif" alt="Computer” width=”300” height=”300”>
</body>
</html>
#HTML Image Maps
An image map is that you should be able to perform different actions depending on where in the image you click.
<html>
<head>
<title>usemap attributes</title>
</head>
<body>
<img src="logo.jpg" usemap="#imp">
<map name="imp" id="#imp">
<area shape="rect" cords="4,0,209,101" href="heading.html" target="blank">
</map>
</body>
</html>
Note:- Imag-map.net this site is used to search the image cords or coordinates.
No.8:-
Q. How to set background image in webpage?
Ans.
<html>
<head><title>set background image </title></head>
<body background="jeep.jpg" alt="error">any thing write in body
</body></html>
Q. How to set background color in webpage?
Ans.
<html>
<head><title>set background color</title></head>
<body bgcolor="gray" >any thing write in body
</body></html>
No.9:-
HTML allows animated GIFs:
<head>
<title>insert animated image</title>
</head>
<body>
<img src="programming.gif" alt="Computer” width=”300” height=”300”>
</body>
</html>
An image map is that you should be able to perform different actions depending on where in the image you click.
<html>
<head>
<title>usemap attributes</title>
</head>
<body>
<img src="logo.jpg" usemap="#imp">
<map name="imp" id="#imp">
<area shape="rect" cords="4,0,209,101" href="heading.html" target="blank">
</map>
</body>
</html>
Note:- Imag-map.net this site is used to search the image cords or coordinates.
No.8:-
Ans.
<head>
Ans.
<head>
HTML Favicon:-
#HTML Video
The HTML <video> element is used to show a video on a web page.
<html>
<head>
<title>video tag</title>
</head>
<body>
<video controls="controls" src="v.mp4" height="500" >
</video>
</body>
</html>
#How it Works
- The controls attribute adds video controls, like play, pause, and volume.
- The text between the <video> and </video> tags will only be displayed in browsers that do not support the <video> element.
- The loop attribute used to vedio repeatly play.
- The poster attribute used for insert thumnail your video.
#HTML <video> Autoplay
<html>
<head>
<title>video autoplay</title>
</head>
<body>
<video controls="controls" src="v.mp4" height="500"
autoplay >
</video>
</body>
</html>
#HTML Video loop and poster attributes
<html>
<head>
<title>video loop and poster attributes</title>
</head>
<body>
<video controls="controls" src="v.mp4" height="500"
loop='loop" poster="image.jpg">
</video>
</body>
</html>
#HTML Audio
- To play an audio file in HTML, use the <audio> element:
- The HTML <audio> Element
- To play an audio file in HTML, use the <audio> element:
WAP:-
<html>
<head>
<title> a audio tag</title>
</head>
<body>
<audio src="kujsaal.mp3" controls="controls" loop="loop" muted="muted" autoplay="autoplay">
</audio>
</body>
</html>
HTML Audio - How It Works
- The controls attribute adds audio controls, like play, pause, and volume.
- The text between the <audio> and </audio> tags will only be displayed in browsers .
- To start an audio file automatically, use the autoplay attribute.
- Add muted after autoplay to let your audio file start playing automatically (but muted).
No comments:
Post a Comment
THANK YOU