IMAGE TAGS
page tags      head tags      text layout      font tags      lists      non-breaking spaces       text commands       accents      image tags      anchors & links      tables      table tags      table properties       cool tags

 

tag FUNCTION end tag
<img> inserts an image. To say which image you need to define it's source (src):

You do this by pointing to the image location, then a forward slash followed by the image filename, so if yor image is called picture.jpg and in a folder called images you would key in <img src="images/picture.jpg">

if your image is in the same file as your webpage you don't need to point to a location, so you just key in <img src="picture.jpg">

Within the <img> tag you can also define the size of the image, give it a border, add an alt description of the image, and align it making the text run round the image:
If you wanted the size of you image to be 225 pixels high by 340 pixels wide then you would enter height="204" width="140"
(image sizes can also be set in percent, but then they won't show in 4.5 browsers or earlier)
The border size is always in pixels, so if you want a 2 pixel border then the code is border="2"
(if you apply a link to an image and you don't want a border set the border size as 0 otherwise it will show a default border)

alt descriptions are useful on two counts.

  1. the viewer knows what image should be there if it doesnt show
  2. If a blind person is using sound enabling software to visit your site then the alt description will read out

If you were using an alt tag to describe your green croaky frog you would key in alt="my green croaky frog"


my croaky frogThere are various ways to align an image. They include baseline, top, middle, bottom, text top, absolute middle, absolute bottom, left and right.

The important ones are left and right because they allow text to run around ith image. If you key in align="right" then the image aligns itself to the right letting the text flo round the left hand side.


I'm using an image called frog3.gif so if we key in all the instructions above then we get the following code;
<img src="frog3.gif" width="140" height="204" border="2" align="right" alt="my croaky frog">

 

 


ANCHORS AND LINKS
page tags      head tags      text layout      font tags      lists      non-breaking spaces       text commands       accents      image tags      anchors & links      tables      table tags      table properties       cool tags

 

The <a> tag defines both named anchors and links. In the named anchor it contains a name that a link can find, whereas in a link it contains a hyper reference to a named anchor, anther page or website or an email address.
 
tag FUNCTION end tag
<a> On this page I've got two named anchors, one for the Image Tags section and one for the Anchors and Links. The name I've given the image tags anchor is image. Therefore the code for this anchor is <a name="image"></a>
</a>
<a>

To create a link you have to put the code href= to point the link in the right direction.

For a link to a named anchor I would the type # and the name of the anchor in inverted commas, making the link to the "Image" named anchor <a href="#image"> with the end tag </a>.
Try it and see
You do'nt need the hash symbol with any of the other links.
           Page Links
What I've done is create a page called star.html in the same folder, so if I want to link to that page the code would simply be <a href="star.html"> tag and the end tag </a> wrapped round the text
When you've got this little lot sussed check out thr code for the star.html page - it links from that page to a named anchor on this page.

           Hyper Links
With a hyper link the href points to the full URL (web address of the site you're going to, so the code for a link to Google UK would be <a href="http://www.google.co.uk"> followed by </a>
           Targets
If I want the viewer to keep my page up on his computer when he goes to another site I can target the link to open in a new window. the instruction for this is target="_blank" (don't forget the underscore). To do this I type in <a href="http://www.google.co.uk" target="_blank">GOOGLE</a>. Try it and see.

The only one left now is email links. For that the href equals mailto: followed by the email address, so if you were to email me you'd key in <a href="mailto:[email protected]>email me</a>

</a>

 


ON LINE JONES

Home         CONTINUE TO TABLES

Hosted by www.Geocities.ws

1