Linking to half way down the page! HTML boffs get in here!

Soldato
Joined
1 Jul 2004
Posts
7,223
Location
Sunny Manchester
How do I go about getting a link to a certain OcUK product that is half way down a page?

Example is say I want to link to the Opty 144 which is half way down the 'this week only deals' page, how do I do that?

Saves the person opening the link going all the way down the page.

Something very simple but I dont know how to do it lol.

Using Firefox if you want to know.

Thanks :)
 
By using 'a name' tags:

Use this near to where you want the page to go to:

<a name="something"></a> These will not be visible on the webpage.

And to link to them:

<a href="whateverpage.htm#something"> </a>

:)
 
Last edited:
i thought this was only possible if an anchor had been placed at that location in the code :confused:
 
The OcUK product pages look something like this if you view the source code:

Code:
<A NAME="[b]aMO_2d001_2dDE[/b]"></A><FONT FACE="ARIAL" SIZE="+1"><B>Dell Ultrasharp 2405FPW 24" Widescreen LCD Monitor - Midnight Grey (30906) (MO-001-DE)</B></FONT>

View the source code then use Find to locate the product you're looking for and copy the bold bit and link in the fashion Tony gave :)
 
Right Ive got you. Ive got the 'bold' part of the product I want to see.

Now if I do what you have put there, but with my bold bit and put it in url tags it doesnt work.
 
Its really so I can post the link to my friends in emails or on msn or on forums, saving them to scroll down the page.

Its actually not going on a website. Can it be possibly done?

Sorry for the confusion.
 
Tony Soprano said:
By using 'a name' tags:
Bear in mind that if you are authoring in XHTML, the name attribute is deprecated. You should be using the id attribute for fragment identifiers:
Code:
<a id="something" ...>
instead of:
Code:
<a name="something" ...>
IDs can be placed on pretty much any element, so you don't necessarily need to use an <a> to created a linkable point (applies to HTML4 too). :)
 
Last edited:
Back
Top Bottom