Tutorials & Script Homepage
Beginners 8to14
HTML Introduction (Part 3)
HTML Introduction (Part 4)
HTML Introduction (Part 5)
HTML Introduction (Part 6)
HTML Introduction (Part 7)
HTML Tags Quick Reference
CSS Introduction
advertisment
advertisement
advertisement
Host With Us: HostingHelper.co.uk From Only $5.00p/m
Spotted an Error ? Let us Know
100's more FREE templates at FreeWebTemplates
Looking for a new Web Host ?
Free templates from TemplatesLand
Professional High-End Templates
TemplateBox.com more FREE templates
Free Flash Templates and Intros
advertisement
 
WEB PAGE CREATION FOR BEGINNERS: HTML INTRODUCTION (PART 6)
This beginners tutorial is brought to you in partnership with Templatemonster.com, the one stop shop for high end templates.
This article is taken from the www.htmlgoodies.com web site, and was written by Joe Burns.
Manipulating Images

Use these to jump around or read it all

Placement On Page Aligning Text With Images Changing Image Size The <HR> Command


Just as I thought a primer, Part 3, was required explaining how to manipulate text, I also think one is needed on how to manipulate images. Believe it or not, manipulating images is easier than manipulating text. So, here we go.

Placement On The Page
First let's worry about placing the image somewhere on the page. The default is justified to the left. If you write an image flag on a page, the image will pop up hard left.

If you want to have an image placed in the center of the page, you might be able to guess at this point that you'd use the <CENTER> and </CENTER> commands described in Part 3.

But how do we get the image to the right of the page? Well, how did we get text to the right? By adding the attribute ALIGN="--" to the <P> command, right? Could it be we do the same thing here? Why yes, it could.

Here's the format:

<IMG ALIGN="right" SRC="image.gif">


Here's what you get using "sally.gif" in place of "image.gif":



Aligning Text With Images
Images don't always stand alone. You will often want text alongside them. Here you will ALIGN text along the top, the middle, or the bottom. Again, you'll use the ALIGN="--" attribute with one of these three: "top", "middle", or "bottom".

Here are the formats:

<IMG ALIGN="top" SRC="sally.gif"> text text text

<IMG ALIGN="middle" SRC="sally.gif"> text text text

<IMG ALIGN="bottom" SRC="sally.gif"> text text text

And here's what it all looks like:

This is text ALIGN="top"

This is text ALIGN="middle"

This is text ALIGN="bottom"

You may notice that using the top, middle, and bottom attributes only allows for one line of text and then the rest jumps down below the image.

Here's the trick to solving that. Don't use the top, middle, or bottom attribute unless you only want one line of text. If you want text to wrap around the image, use ALIGN="left" and ALIGN="right".

Even if the image is already to the left, use the ALIGN="left" attribute anyway. It allows the text to wrap around the image fully. Try it, it's quite a clever little deal.

Two At Once?
But what if you want only one line of text to come out of the middle of the image, and you want the image aligned to the right? Can you use two ALIGN="--" attributes in the same image? No.

You set the text coming out of the middle using the ALIGN="middle" attribute in the IMG flag. Then you set the image and its text to the right by surrounding the two items with the <P ALIGN="right"> and </P> commands.

Are you starting to see how a flag does only one thing? If you want two effects placed on one item, you're going to have to use two different sets of flags.

Changing Image Size
To begin this discussion, let me state that images on a computer are not like photographs. Computer images are made up of a lot of little colored dots. They're known as picture elements or "pixels" for short. So, just remember that during this part of the Primer, numbers refer to pixels rather than inches, or centimeters, or whatever. When I say pixels, I'm talking little colored dots.

Every image is made up of pixels. The more pixels per inch the image has the better, and more detailed, the image will appear. Of course, that also means the image will take up a whole lot more bytes on your hard drive. You're going to find that most images on the Web are 72 and 100 pixels per inch. Yes, there are other settings, but 72-100 is a good trade-off between loss of detail and bytes required.

Okay, so every image is made of pixels. This means that you can also denote an image by number of pixels. For example, the "sally.gif" image is 97 pixels high by 64 pixels wide. How do I know that? I have an expensive graphics program that tells me so. How would you know? Without a specific program, you wouldn't. You'll have to play around with the numbers in these commands a little bit, but it's easy to do.

You might also want to open the image by itself in the Netscape Navigator browser window. Do that by choosing OPEN FILE under the FILE menu. When the picture pops up, look at the title bar along the very top. The height and width should be there.

Of course, you can also go out onto the Web and surf around for a shareware graphics program. My personal favorite is PaintShop Pro. You get it for free for 30 days and then it's like $80 or so to get it for good.

Here's what you do. Denote to the image command how many pixels high by how many pixels wide you want. The "sally.gif" image is 64X97 pixels. If I want the image to appear smaller, I will ask for the pixels to be smaller, say 30X55. If I want it bigger, I would set the pixels larger, say 100X250. Just remember form. If you make the image smaller or larger, you must keep the same general square, rectangle, or whatever, form.

Of course, if I want to, I can totally distort the picture.

Here's the coding:

<IMG HEIGHT="##" WIDTH="##" SRC="image.gif">

Notice the HEIGHT and WIDTH attributes nestled right where the ALIGN command went before. You will replace the "##" with a number of pixels for height and width. Here are the three examples:

This is normal size:



This is 30X55:


This is 100X250:


This is 100X23:



The <HR> Flag
The WIDTH command also works on the <HR> command, except you'll use percentages. Watch this:

<HR WIDTH="40%"> gives you this:




<HR WIDTH="64%"> gives you this:




You get the idea, yes?
That wraps it up. Try these in the comfort of your own home under the supervision of an adult. If you are an adult, then find a kid who can program the VCR to help you along.

<< Previous Beginners Article | Next Beginners Article >>
Beginners Main Menu 1 to 7 | Beginners Main Menu 8 to 14 Beginners Main Menu 15 to 21

Web Hosting  |  Membership website templates  |  Reliable UK Web Hosting  |  dresses  |  Art Web Templates  |  Cheap Flight Deals  |  UK Web Hosting Company  |  Coursework Writing  |  Reseller Hosting  |  coches de ocasion  |  Cheap UK Web Hosting  |   cell phones  |  Web Design  |  Low Cost Domain Names  |  Website templates  |  master a distancia  |  Austin Web Design  |  Flash Templates  |  Factory  |   cell phones  |  Canadian Web Hosting  |  Flash Intros  |  Web Templates  |  cartuchos  |  Corporate Logo Design Service  |  Website Templates  |  Bespoke Software Development  |  Domain Name Registration  |  Free Website Templates  |   Dedicated Server  |  UK Web Hosting  |  Dating Software - aeDating 4.1  |  Website Templates  |  Power Saver  |  taobao agent  |  Flash templates  |  cctv cameras  |  Lolita Dresse  |  china wholesale  |  Canadian Web Hosting  |   Cheap Web Hosting Deal  |  Linux Hosting  |  Web Design uk  |  Web Hosting  |  Business web directory  |  Electronics  |  Free domain names  |  Best UK web Hosting  |  Shower Enclosures UK  |  

 
advertisment
advertisment
advertisment
  Top-end templates
  Flash Templates
  Web Hosting UK
  Made-in-China.com
  Web Design Tips
  Web Hosting Reviews
  Web hosting reviews
  Website Design
  Top web hosting
  Stock Photography
  Bildagentur
  Reseller Hosting
  Company Logos
  Website Templates
  Website Templates
  Web Hosting UK
  templatebox.com
  freewebtemplates.com
  templatesland.com
  topfreegraphics.com
  freegraphicland.com
  free-templates-layouts
  Logo Design Software
  Layouts4Free
  Webmaster Resoucres
  Web Templates Factory
  Free Web Templates
  Free Templates Catalog
  Web Templates
  Reseller Web Hosting
  Stock Photography
  Animations-galore.com
  4print.com.au
  Host Review
  Web Hosting Host Color
  Dedicated Servers
  FlashTemplateDesign
  ZeroDollarTemplates
  Killersites.com
  how-to-build-websites
  Build a free website
  web Hosting
  Business Logo Design
  Templates Favpage
  webmastermind.de
  flasheasy.com
  More Featured Sites