Developing Webs logo
Google
Web DW-Main DW-Photoshop
Visit the message board for solutions or post a question Check out the Classes offered for free at Developing Webs Voice Chat submit a tutorial, resources, article, font for publication consideration and earn a one way link back to your site Get more specifics about the Developing Webs Voice chat room and its room members View the current news at Developing Webs alternative sites which are resources for your d3evelopment needs Join Developing Webs Chat Link to us on your web page to help support this resource! Check out Developing Webs At yahoo groups! Developing Webs Home Adobe Photoshop Tutorials Macromedia Flash Tutorials Jasc Paint Shop Pro Tutorials Adobe Illustrator Animation basics Some Basic PHP tutorials Perl Tutorials HTML Tutorials Cascading Style Sheets javascript Front Page Tutorials Macromedia Dream Weaver Tutorials dreamweaver Publishing your site, FTP, ChMod, Promotions
RSS Newsfeed
for your site
DW News
Calendar
DW Forum
Right click on button and copy shortcut

Add to My Yahoo!

Reminder
Remember to book mark this site!



Request a Tutorial

HTML stands for HyperText Markup Language

Part 5: Image Attributes

There are main attributes we can add to the image tag which describe or alter the appearance of the image.

 

  1. ALIGN
    One we already touched on is the align tag. When used with the image it allows the image to be oriented in some horizontal location on the page in relationship to the text, or with slight vertical adjustments. Typical align values are right, center, left, top, middle.

     

  2. WIDTH
    The width tag will tell the browser how wide to display the image. This will set the placeholder for hte image as it loads, and/or can be used to adjust the size the image is displayed at on your page.
    The numbers we use for width are pixels. For comparison, most monitors are 800 pixels across and 600 down. You can also use percentages, where 100% would be full width.
     
  3. USAGE
    In the code below, align and width tags have been added to the image as attributes of the image in the code.


    Let's go over a few codes

    • height - the height of the image
    • width - the width of the image
    • align - the horizontal alignment of the image
    • top----------aligns the text with the top of the picture
    • bottom-------aligns text with bottom of picture
    • middle-------aligns the text with the middle of the image
    • right--------aligns image at right margin, and text will wrap on the left side of it
    • left---------aligns picture at the left margin, and text will wrap on the right of it
    • hspace should be the amount of space you want on the sides your picture in pixels
    • vspace should be the amount of space you want on the top and bottom of your picture in pixels

    Let's put some more of this into our code



    Save your html and view it
    Once again, code does not have to be memorized, you will become more familiar with it as you use it.

    There are two more codes regarding images
     

  4. ALT
    The alternate attribute is Alt="" such as

    <img src="http://www.porshiana.com/waterimage.jpg" alt="island">

    This code is used to display the word "island" should your picture not show up for some reason. This works out well for people who are visually impared or use text only browsers.

     
  5. BORDER
    The other code is border="number". This border code is used when you link the picture to a page, as we will learn to do in the next lesson. It can be used to add the border around an image that is unlinked too.

     

    When you are ready we can move on to lesson 6, links.
     



"Building The Web Into a Nicer Place -- One Site At A Time"
Developing Webs Group Copyright © 2001-2024 All Rights Reserved
Privacy and Legal