HTML Image


Image is a very important element in presenting information. <img> HTML provides tags for displaying images on your web page.
<IMG SRC="image1.gif" ALT="image1">
HTML command above will display images image1.gif and displays the text "image1" if the browser to turn off graphics viewer facility. Extension of the usual graphic display by the HTML are GIF, JPG, and BMP.
You can also combine graphics with tags <a> to create a link from your image.
<IMG SRC="image1.gif" ALT="image1" HREF="www.google.com">
ALT attribute is used to display an image replacement text for browsers that do not support the use of images or if the client deliberately shut down the facility.
You can also use the align attribute to set the position of the image of the adjacent text. Examples:
<HTML>
<HEAD>
<TITLE> image.htm </ TITLE>
</ HEAD>
<BODY>
<H1> Search Engine Website</ H1>
Go to the web site <BR> <IMG SRC="image1.gif" ALIGN="MIDDLE"> <A HREF="www.google.com"> Google Search Engine</A>
 
</ BODY>
</ HTML>
 
In the HTML example above, the image is aligned to the middle. You can try to align and align bottom for comparison.
 
By adding HSPACE and VSPACE attributes, you can set the frame that surrounds the image.
<HTML>
<HEAD>
<TITLE> image2.htm </ TITLE>
</ HEAD>
<BODY>
<H1> Search Engine Website</ H1>
<BR> Go to the web site <IMG SRC = "image1.gif" ALIGN = "MIDDLE" HSPACE = 13 VSPACE=13><A HREF="www.google.com"> Google Search Engine</A>


</ BODY>
</ HTML>
 
If your image feels too small or too large, you can set your own width and length of the image controls the properties WIDTH and HEIGHT in the tag <img>.
<HTML>
<HEAD>
<TITLE> image3.htm </ TITLE>
</ HEAD>
<BODY>
<H1> Search Engine Website </ H1>
<BR> Go to the web site <IMG SRC = "image1.gif" ALIGN = "MIDDLE" WIDTH= 50 HEIGHT=50><A HREF="www.google.com"> Google Search Engine</A>

</ BODY>
</ HTML>

To create a link in an e-mail address.
<A HREF="mailto:webmaster@google.com"> Click here </A>
To create a link to another section on the same page.
<A HREF="#computer"> Click here </A>
To create link goto the other section on different pages .
<A HREF="page4.html#computer"> Click here </A>
To create a link using the image.
<A HREF="page4.html"> <IMG SRC="my_logo.gif"> </A>

0 comments:

Post a Comment