iTech College - Internet Technology, Online Education, E-Learning, Technician Training, Tech Tutorials, Distance Education, Virtual Learning HTML Course: Image - www.itechcollege.com HTML Course: Image - www.itechcollege.com
Online Degrees Scholarships & Fellowships Internships Student Financial Aid Study Abroad Itech Bookstore
Free Courses
HTML
JavaScript
CSS
ASP
PHP
JSP
ASP.NET
SQL
AJAX
FTP
XML
Career Center
Job List
Web Jobs
Student Jobs
Computer Jobs
Engineer Jobs
Developer Jobs
Job Search
Resume Writing
Job Interview
Salary Info


itech > courses > HTML > Image

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="http://www.selectagps.com/images/c.gif">

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:

<BODY BACKGROUND="ImageName">

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>

  Back to Index Page
Next Page >>   Basic Tags
Character Paragraph and Position
Character Style
Lists
Links
Image
Color
Table
Form
Frame
 

HTML Books
HTML Jobs



Bookmark:  del.icio.us digg facebook Reddit Mixx BlinkList Fark Furl NewsVine Simpy Spurl Segnalo Technorati blogmarks Google YahooMyWeb Windows Live



HTML Course: Image - www.itechcollege.com
Copyright ©2008, itechcollege.com. All rights reserved
iTechCollege | About iTech | Contact iTech