How to Insert an Image into a Web Page
Karl Kasca
Inserting an image into a Web Page is straightforward, but the
formatting and placement of images can be tricky, depending on what
software program you are using. Given this, there are a few basic
things you should know and beyond that it's up to your knowledge and/or
software, programmers, or programming.
Skip to
Video
- Note: You should skim
the text in this article just in case there's
something interesting/useful that is *not* included in the
Video.
Action Steps
- Open the HTML document you wish to edit using your HTML
editing software
- Note: For this example, we'll use the free KompoZer
program.
- Either select:
- Insert > Image (from the menu), or the
- Image icon on the toolbar (Insert Image)
- Under the "Location" tab of the Image Properties
dialog box which comes up:
- Enter the Image location, or browse your hard drive for
the image file, in the dialog box.
- Note: To have the image appear when the HTML document
is on the web, you'll need to link to a web location (URL) for the
image
file, e.g., http://www.increaseonlineprofits.com/public/images/ShinyBlueArrowRight.gif
- See the related article on "How to Upload a File
(or Image) to your Website" so you'll have a file on your site
you can link to.
- Enter the Alternative Text (Alt Text) for the image.
- This is text that visually impaired people can read
with text readers, instead of viewing the image itself.
- Be descriptive enough that reading the text alone
would make sense to you even if you couldn't see the image, e.g.,
- "Image of Shiny Blue Arrow pointing to the Right"
- Alternative text (Alt Text) is also great to use
because
it's indexed by Google and other search engines.
- You should also do this to comply with W3C Web Content
Accessibility Guidelines and the law (US Section 508 of the
Rehabilitation Act of 1973):
- See: Web accessibility: IBM Web Accessibility
Checklist, W3C Web Content Accessibility Guidelines (WCAG) and US
Section 508, or http://www-03.ibm.com/able/guidelines/web/ibm508wcag.html.
- Under the "Dimensions" tab of the Image Properties dialog
box:
- Choose the size of the image (either Actual or Custom, in
pixels)
- Trick #1: If you're not sure what size in pixels, check
"Constrain" and type a number (smaller or larger than the original
number of pixels) and then hit your Tab key...and KompoZer will
automatically adjust the height. Then hit OK and see what the
image looks like in your HTML file and adjust from there.
- Trick #2: If the image is too large (in visual size and
file size) and you need to make a smaller file, just adjust
the image size in KompoZer by left-clicking on the image and dragging
one of the corners to the right size.
Then take a screen shot
of the image with SnagIt or Jing and save the smaller file and then go
back to step #1 and insert this new image.
- Under the "Appearance" tab of the Image Properties dialog
box:
- For Spacing: Enter numbers in pixels if you want a border
(space or solid) around the image.
- For Align Text to Image: Click the down-arrow and choose
where you want the Text to flow. Think about what you want your arrow
to be pointing at and then where the text should be located.
- Under the "Link" tab of the Image Properties box:
- Enter the link to the website URL, named Anchor, Email
Address, you wish to go to when the image is clicked.
- Click on the "Advanced Edit" button in the Image Properties
box:
- Click the Attribute drop-down and choose "Align".
- Click the Valuedrop-down and choose Top, Middle,
Bottom, Left or Right.
- In the example Video (below), I'll choose Right, so
you'll see the
arrow move from the default position on the left of the HTML document.
- Note & Trick: If you want to know what the
image
position is set at you can view the image in "Source" (HTML code) in
KompoZer and see what value is there. At that point you can
simply type in the position you want the image to be in, e.g., if it
shows "Right" you can just type in "Left", then save the HTML document
and go to Normal view to see the new position of the image.
Simple, right?
- Well, maybe not at first, but if you play with this a short while,
you'll get the hang of it.
Here's
the "Shiny Blue Arrow" (on the left), with the text wrapping on the
right.
Right-click on the arrow to view the Image Proerties.
Video
of How to Insert an Image into a Web Page
- Note: You should skim
the text in
this article just in case there's something interesting/useful
that is
*not* included in the Video.
ARTICLE DATE: 11/28/08
REVISED DATE:
#bottom_spacer# height=1 ALT=""> |
| |
How to Insert an Image into a Web Page
">