Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Link to specific part of page

I've tried all of the following:

<a name="test"></a>
<a id="test"></a>
<h4 id="test">SOME TEXT</h4>

And then linking to them like this:

<a href="pagename#test">

All of the above work with Firefox, IE and Chrome, but none of them worked with Safari 5.xx on a mac. Any help is very much appreciated.

like image 859
niGeLL Avatar asked Jan 15 '23 11:01

niGeLL


1 Answers

<a href="#test">Go to Test</a>

. . .

<div id="test">This is Test.</div>

This should work.

EDITED: Also, if you want to link to a particular id in a different page, which I think you do, use:

<a href="somepage.html#test">Go to Test on some different page.</a>

like image 129
Fahad Avatar answered Jan 22 '23 11:01

Fahad