Monday, 4 February 2013

How to create Html Image


Most Web browsers can display images that are in GIF, or JPEG format. To include an image, enter:
<IMG SRC="ImageName">
For example: <IMG SRC="monky.gif"> The <IMG> tag is used to define an image. This tag does not have a closing tag. The IMG part tells the browser to add an image, The SRC tells your browser where to find the image. You should include two other attributes on <IMG> tags to tell your browser the size of the images. The HEIGHT and WIDTH attributes let your browser set aside the appropriate space (in pixels) for the images. For example:
<IMG SRC="monky.gif" HEIGHT=80 WIDTH=100>
You can put an image in the left or right of a page by using  ALIGN.. For example:
<IMG SRC="ImageName" ALIGN="right">
By default the bottom of an image is aligned with the following text. You can align images to the top, bottom or middle of a paragraph by using one of three things: TOP, MIDDLE, BOTTOM, For example:
<IMG SRC="monky.gif" ALIGN="top">
Note: You must use "align", not "valign" to set for TOP, MIDDLE, BOTTOM. It's different from the table alignment. We can use "vspace" and "hspace" to adjust space around the picture:
<IMG SRC="monky.gif" vspace="50" hspace="80">
The ALT attribute is one of IMG attributes. You can use the ALT attribute to specify text to be displayed instead of an image. For example:
<IMG SRC="monky.gif" ALT="[monky]">
In this example, if someone cannot see the image, at least they will be able to read the name of the image and know that it would be a monky because the words "[monky]" is shown in the place.
An image can be used as hyperlinks just like plain text. The following is the HTML code:
<A HREF="animal.html"><IMG SRC="monky.gif"></A>
The blue border that surrounds the image indicates that it's a clickable hyperlink. If you do not want to display this border, you can add the BORDER attribute and setting it to zero:
<A HREF="animal.html"><IMG SRC="monky.gif" BORDER=0></A>
You can load an image from another webpage to your page. To display a image on some one else's page, you need to find the URL:
<IMG SRC="">
You also can use an image as a background. The tag to include a background image is included in the <BODY> statement as an attribute:
A large inline image would slow down the loading of the main document. To avoid it, you may have an image open as an external image. To include a reference to an external image, enter:
<A HREF="ImageName">link anchor</A>
You can also use a smaller image as a link to a larger image. Enter:
<A HREF="LargerImageName"><IMG SRC="SmallImageName"></A>


Basic Tags
Character paragraph and positions tags
Styles Tags
Lists Tags
Links Tags
Images Tags

No comments:

Post a Comment