SunQuest
 
       HTML
  Home arrow HTML arrow HTML Working with Images
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
IBM developerWorks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
HTML

HTML Working with Images
By: James Payne
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-02-22

    Table of Contents:
  • HTML Working with Images
  • Alternatives to Images
  • Setting an Image as the Background
  • Setting Your Image as a Hyperlink

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    HTML Working with Images


    (Page 1 of 4 )

    In our last tutorial we discussed working with forms in HTML. In this episode we will cover how to work with images, such as floating images, image maps, and background images.

    Aside from making your website look pretty, images serve a number of purposes in HTML. You can use them for attractive navigational links, for backgrounds, and even to add interactivity to your website. Since font support is limited to the type of fonts a user has on their computer, images also allow for you to create images of the fonts you like and use them on your page. Be forewarned however, as the more images you put on your page, the longer it will take them to load. And too many images can make a website look busy and cluttered.

    How to Insert an Image

    You insert images into your web page using the <img> tag. The source part, or attribute, tells the computer where the image is located, as shown below:


    <html>

    <body>

    <p>

    Here is a sample image:

    <img src="sample.gif"

    width="144" height="50">

    </p>

    <p>

    Here is the same image, only bigger:

    <img src="sample.gif"

    width="288" height="100">

    </p>

    <p>

    Here is the same image, only smaller:

    <img src="sample.gif"

    width="77" height="50">

    </p>

    </body>

    </html>

    This code inserts three images, using the <img> tag. While all of the images are the same (sample.gif), we used the height and width properties to manipulate the size of each one, creating a normal-sized image, a small-sized image, and a large-sized image.

    If you have images located in different places on your server, or another server entirely, you can link to them this way:


    <html>

    <body>

    <p>

    An image from another folder on your server:

    <img src="/images/sample.gif"

    width="50" height="50">

    </p>

    <p>

    An image from another website:

    <img src="http://www.devshed.com/images/sample.gif">

    </p>

    </body>

    </html>

    More HTML Articles
    More By James Payne


       · Thanks for dropping by. In thia article we discuss working with images in HTML. Some...
     

    HTML ARTICLES

    - Building Single Row Database Forms with HTML
    - Introduction to Database Forms with HTML
    - Another Look at Animation of Geographical Ma...
    - Animation of Geographical Map Regions
    - Changing and Moving Pictures with CSS
    - Clickable Geographical Map Regions
    - Gradient Creation with the HR Element
    - Text on HTML Images: Do it Yourself
    - Custom Buttons in HTML
    - Quick Web Page Menu
    - Maximizing and Restoring HTML Images with th...
    - Maximizing and Restoring HTML Images with th...
    - Handling Hyperlinks and Images in HTML
    - Quick Start with HTML
    - HTML Tips







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway