Images

Did you notice that the page loaded, and you began reading, and then the image came later, such that you did not have to wait for the image to download ?
The image is a photo of an Australian Crimson Rosella (parrot) standing on a bitumen carpark on Wilson's Promontory, Victoria.

You have learnt simple formating for straight text. Now you might like to learn how to bring in images and arrange them in your layout.
Objects like images can be moved by using align="left/center/right".
Try:


<img src="images/11th_parrot.jpg" align="left" alt="Crimson Rosella" />Crimson Rosella
<br />1 xxxxxxx xxxxx xx xxxxxx xxx xx xxxxx xxx xxxxxx xx xxxxxx xx xxxxxxxx xx
<br />2 xxxxxxx xxxxx xx xxxxxx xxx xx xxxxx xxx xxxxxx xx xxxxxx xx xxxxxxxx xx
<br />3 xxxxxxx xxxxx xx xxxxxx xxx xx xxxxx xxx xxxxxx xx xxxxxx xx xxxxxxxx xx
<br />4 xxxxxxx xxxxx xx xxxxxx xxx xx xxxxx xxx xxxxxx xx xxxxxx xx xxxxxxxx xx
<br />5 xxxxxxx xxxxx xx xxxxxx xxx xx xxxxx xxx xxxxxx xx xxxxxx xx xxxxxxxx xx


<img src="images/11th_parrot.jpg" alt="Crimson Rosella" align="center" />Crimson Rosella
<br />6 Altho this aligns center, the attribute align="center" is NOT valid. xxxxxxx xxxxx xx xxxxxx xxx xx xxxxx xxx xxxxxx xx xxxxxx xx xxxxxxxx xx xxxxxxxx xx
<br />7 xxxxxxx xxxxx xx xxxxxx xxx xx xxxxx xxx xxxxxx xx xxxxxx xx xxxxxxxx xx xxxxxxxx xx
<br />8 xxxxxxx xxxxx xx xxxxxx xxx xx xxxxx xxx xxxxxx xx xxxxxx xx xxxxxxxx xx xxxxxxxx xx


<img src="images/11th_parrot.jpg" alt="Crimson Rosella" align="right" />Crimson Rosella
<br />9 xxxxxxx xxxxx xx xxxxxx xxx xx xxxxx xxx xxxxxx xx xxxxxx xx xxxxxxxx xx xxxxxx xx
<br />10 xxxxxxx xxxxx xx xxxxxx xxx xx xxxxx xxx xxxxxx xx xxxxxx xx xxxxxxxx xx xxxxxx xx
<br />11 xxxxxxx xxxxx xx xxxxxx xxx xx xxxxx xxx xxxxxx xx xxxxxx xx xxxxxxxx xx xxxxxx xx


<img src="images/11th_parrot.jpg" alt="Crimson Rosella" />Crimson Rosella
<br />12 xxxxxxx xxxxx xx xxxxxx xxx xx xxxxx xxx xxxxxx xx xxxxxx xx xxxxxxxx xx xxxxxx xx
<br />13 xxxxxxx xxxxx xx xxxxxx xxx xx xxxxx xxx xxxxxx xx xxxxxx xx xxxxxxxx xx xxxxxx xx
<br />14 xxxxxxx xxxxx xx xxxxxx xxx xx xxxxx xxx xxxxxx xx xxxxxx xx xxxxxxxx xx xxxxxx xx

Study these very carefully till you have linked each script to its effect.
<br />What is the difference between the different placement of <br /> before and after <img> in the following:
<br />1xxxxxxxxxxxxxxxxxxxxxxxxx

<br /><img src="images/11th_parrot.jpg" alt="Crimson Rosella" align="right" />
<br />2xxxxxxxxxxxxxxxxxxxxxxxxx
<br />3xxxxxxxxxxxxxxxxxxxxxxxxx
<br />4xxxxxxxxxxxxxxxxxxxxxxxxx
<br />5xxxxxxxxxxxxxxxxxxxxxxxxx
<br />6xxxxxxxxxxxxxxxxxxxxxxxxx

<img src="images/11th_parrot.jpg" alt="Crimson Rosella" align="right" />
<br />7xxxxxxxxxxxxxxxxxxxxxxxxx
<br />8xxxxxxxxxxxxxxxxxxxxxxxxx
<br />9xxxxxxxxxxxxxxxxxxxxxxxxx
<br />10xxxxxxxxxxxxxxxxxxxxxxxxx
<br />11xxxxxxxxxxxxxxxxxxxxxxxxx
<br />12xxxxxxxxxxxxxxxxxxxxxxxxx
<img src="images/11th_parrot.jpg" alt="Crimson Rosella" align="right" />
7xxxxxxxxxxxxxxxxxxxxxxxxx
<br />8xxxxxxxxxxxxxxxxxxxxxxxxx
<br />9xxxxxxxxxxxxxxxxxxxxxxxxx
<br />10xxxxxxxxxxxxxxxxxxxxxxxxx
<br />11xxxxxxxxxxxxxxxxxxxxxxxxx
<br />12xxxxxxxxxxxxxxxxxxxxxxxxx

An important property is to determine the size of the image on your page. For this, use width=""or height="". Using both can distort your image by changing its proportions. I use only width because that is more important on a page.
Example: <img src="images/11th_parrot.jpg" alt="Crimson Rosella thumbnail" width="100px" />

Thumbnails, that is, very small images with amazingly small file-sizes of about 1KB, are quickly downloaded, and then give the user a small picture from which she can decide whether to take a closer look by clicking in the large version.
The script for this is: <a href="images/11_parrot_lossy.jpg" alt="Rosella parrot - [21KB]"><img src="images/11th_parrot.jpg" alt="Rosella parrot" /></a>
The "th" in "11th_parrot.jpg" stands for thumbnail. The "lossy" in "11_parrot_lossy.jpg" means this jpeg photo has had its quality greatly reduced to shrink its file-size from 47KB to 21KB.

And here is the result: Crimson Rosella

A width of 100px is good for thumbnails being used for links to the larger image. By using Photoshop or similar you can get the filesize of a thumbnail down to 1KB, which, at worst, downloads in less than 1 second.

Another way is to use tables, altho tables increase your filesize and thus slow your user's download speed. See the chapter Tables.

To see what is happening here, put your cursor on the edge of your window till the cursor turns into a double-headed arrow, then press and drag left to shrink the window till the images are close to the text. Then study how the pictures line up with the numbered lines.

Background images

You can tile your body's background with an image by ptting this script between <head> and </head>.
<style type="text/css">
body{background:url(images/11_parrot_transparent.jpg) #99ccff }
</style>
If the image cannot be found, the background will be the color #99ccff (a hexadecimal number indicating a light shade of blue). To test this, simpy remove one letter from the name of the image. The image disappears and the background becomes blue. Which do you prefer, the image or the plain blue ?

<p style="background:#99ccff">This can also be done for a heading, blockquote, box or paragraph, as this paragraph shows.
While quiet background patterns can look sophisticated, strong background colors or images make text difficult to read, slow the reader's progress, tire his eyes, and annoy him. I prefer a site which is quick, clear and clean.</p>


As an example, put this code between the </title> and </head> in one of your pages carrying text:
<style type="text/css">
body{background-image:url(images/11th_parrot.jpg) #99ccff}
</style>

Test it to judge if all your users would enjoy reading the text across the brilliance of this photo.
Change from 11th_parrot.jpg to 11_parrot_lossy.jpg. As a user searching for information, not pretty parrots, how would you judge this ?
Change from 11_parrot_lossy.jpg to 11_parrot_transparent.jpg.

You can subdue your photo by using PhotoShop to increase transparency:
Menu >> Image >> Adjust >> Brightness/Contrast
Increase Brightness and decrease Contrast.

Should you use background images ? I go to other websites for information. I want that information to be quick, clear and clean. Background images are irrelevant, feeble attempts to brighten dull pages, and tiresome. You will notice that on this website, there is no background image on any other page.