eHow launches Android app: Get the best of eHow on the go.

How To

How to Use Images in HTML

Member
By Anthony Delgado
User-Submitted Article
(3 Ratings)
Use Images in HTML
Use Images in HTML

Learn to add pictures into HTML code.

Difficulty: Moderately Easy
Instructions
  1. Step 1

    Add picture: (Blue) "img src" defines the image source. In the quotes you put the web path to the image. If you do not put a path, but just put the file name, it will look in the same directory as the html file only. You can use a slash to identify a sub-directory that exists in the same directory as the html file as seen in the example.

  2. Step 2

    Size: (Orange) width and height are used to change the size of the picture in pixels. It is always best to change it proportionally to the original file. For example, if the picture is 800x600, you can change it to 400x300 and it will look the same, just smaller. If you make it 400x400, it will be stretched widthwise.

  3. Step 3

    Alternate Text: "alt" is used to specify alternate text. This text will appear if for some reason the image file is not accessible.

  4. Step 4

    Buttons: (Green) A button is just a picture that has a hyperlink referenced to it so that when you click on the picture, you are redirected to the URL. Use the "a href" function as shown in the example.
    Look at this article for more details.
    http://www.ehow.com/how_2102636_write-html-hyperlink.html

  5. Step 5

    Background: (Red) The background is one of the options in the body command. A background is specified by "body background" and the referencing the location of the picture to be used just like with other pictures.

Comments  

hoosier436 said

Flag This Comment

on 9/17/2009 Thank you.. after looking for an answer over the couple of days.. this works perfectly.. I greatly appreciate it...

hi2ufrmdeb said

Flag This Comment

on 4/2/2009 Great article, Thanks

Post a Comment

Post a Comment
  • Have you done this? Click here to let us know.
I Did This

Related Ads

Internet
Virginia DeBolt,

Meet Virginia DeBolt eHow's Internet Expert.

Get Free Internet Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.

Demand Media
eHow_eHow Technology and Electronics