links

liunx

Guest
I am trying to prove that you can teach an old dog new tricks by teaching myself html at the age of 70.<br />
<br />
My proposed web site has several pages.<br />
<br />
The main page has text and other pages have images in the form of a series of tables where successive images appear to the left and the right.<br />
<br />
I have set up links from the text page to the image pages but cannot find out how to link to a specific image rather than just the page.<br />
<br />
Is this possible using tables and if so how do I do it please?:confused:<!--content-->I'm not sure exactly what you mean, but if you want to link directly to an image this is the code you use <a href=http://www.webdeveloper.com/forum/archive/index.php/"img.jpg">open image</a><br />
<br />
If that isn't what you want, explain further, and we'll get you going...<!--content-->Pyro,<br />
<br />
Thanks for the reply which does not seem to be what I want.,<br />
although I may be misunderstanding you.<br />
<br />
I have a page called MAIN TANK.html and have added a link to the page called EQUIPMENT.html as follows<br />
<br />
<A HREF=http://www.webdeveloper.com/forum/archive/index.php/"EQUIPMENT.html">closed loop<A><br />
<br />
This link takes me to the page Equipment but not to the specific image "closed loop" which is one of many images on that page. I want the link to go directly to the image concerned to save the reader having to scroll through a whole page and losing interest.<br />
<br />
<br />
What other code should I be adding?<!--content-->First of all, it's considered a good habit to give all of your HTML pages names in lower case.<br />
<br />
Second, create a anchor by where you want the link to go to, ie <a name="closedloop"><img src=http://www.webdeveloper.com/forum/archive/index.php/"closedloop.jpg" alt=""> When you want to link to that specific area, use this as the link <a href="equipment.html#closedloop">Closed Loop</a><!--content-->Originally posted by spufi <br />
Second, create a anchor by where you want the link to go to, ie <a name="closedloop"><img src=http://www.webdeveloper.com/forum/archive/index.php/"closedloop.jpg" alt=""> <br />
<br />
In most browsers you don't need to nest things in <a></a>.<br />
<br />
Eg <img id="closedloop" ...<br />
should work just as well.<!--content-->Just after I posted, I thought what I typed was incorrect, or at least slightly wrong. I didn't have time to double check it. When I tried to do something like it before it didn't work. A book showed it as how I posted it, and it worked. Granted it was the name attribute. I'll see if it works with the id one instead.<!--content-->Many thanks I will try that.<br />
:)<!--content-->Again, many thanks.<br />
<br />
I tried it and it worked a treat:D :D :D<!--content-->
 
Back
Top