Graphics are very important component of a webpage. It defines more clearly to your topic, as we all know that a simple picture can define up to 1000 written words. On the other hand you can teach or tell someone by showing picture better than only thick content. Images make your article or webpage more attractive and understandable.
<img> tag is used to insert an image into your webpage
Image attributes defines the properties of an image such as, what will be the length or width of image etc.
Some important image attributes are given under;
<img src=”myimage.jpg” alt=”Image is not loading” width=”138″ height=”126″ border=”3”/>
Src=” ” :
This attribute defines the URL of an image
Alt=” ” :
It means alternative, it works when your image is not loaded and a the text written in this attribute shows.
Height= ” ” :
It defines the height of an image
Width=” ” :
It define the width of your image.
Border=” ” :
It define the border of an image if you give border to your image you can use it
<html> <head> <title>How to use Image </title> </head> <body> <h1> My Images </h1> <img src="images/name.png" alt="Error" width="138" height="126" border=”3”/> </body> </html>
This will show the result as you mentioned in code, if you do not want to show any “alt” or “border” you can exclude that attribute from tag. You must write your correct path and its extension in image src , otherwise an error will be shown.
How to Use Image as a Hyperlink?
When someone clicks on hyper linked image he/she jumps to the other page or place when an image is made as a hyper link. So as you move the mouse over a link, the mouse arrow will turn into a little hand. To use an image as a link, simply nest the <img> tag inside the <a> tag:
<html> <head> <title>Image Link </title> </head> <body> <h1> Click this Image to go </h1> <a href=" http://facebook.com"> <img src="myimage.png" alt="HTML5 Icon" width="128" height="128"> </a> </body> </html>
How to Add Video in your Html Webpage:
Video is another important component of a webpage, we can add video using html tag to display our visitors. In these days video has become very special part of bloggers, with the content, pictures and video is embed to explore things more clearly. In these days video tutorials are watched to learn different things as you as learning html from here and you watch video of this topic that we have embedded.
<embed> tag is used to insert an image into your webpage
Align= ” ” :
It determines how to align the your video either center, left or right.
Autostart= ” ” :
When to be played your video, it accepts Boolean value as true or fall
Width= ” ” :
Width of the of a video on your webpage in pixels
Height=” ” :
Height of the of a video on your webpage in pixels
name =” ” :
A name used to reference the object.
src =” ” :
URL of your video which is to be embedded.
Volume= ” ” :
Controls volume of the sound of your video. It can be from 0 (off) to 100 (full volume).
<html> <head> <title>Video </title> </head> <body><b> My Video</b> <embed src="/video/myvideo.mid" width="50%" height="60" align=”Center” > </embed> </body> </html>