View Full Version : <a href="#" ... > ?
Can anyone please explain me the meaning of this statement in HTML-code?
<a href="#"> Click here </a>
Where does such a link actually point? At the top of of the current page?
7-8-02, 12:00 PM
That type of link would be used in conjunction with a bookmark to navigate on the same page.
Example: Back to Top
It is also used when you want to popup a window or when you want to popup a message in IE.
Of course...as alpha said...in both cases, you would want to remain in the parent page. If you do not have any tags, by default the pages goes up to the top of the page.
<a href="#">click here</a>
So this link works just like "Reload" button in browser? Or does it without reloading go to the top of the page?
7-8-02, 05:04 PM
On this page I have set the bookmark with this. You can also use text links of course.
<a name="book"><img border="0" src="img/bl_temp_logo.gif" width="491" height="78"></a>
The TOP graphic has this link to make it go to the bookmark.
<a href="#book"><img border="0" src="img/top.gif" width="52" height="32"></a>
The page does not reload it will just go to where ever you have the bookmark set.
You could have several that would move you around the page without ever reloading it.
but if you use it on it's own as you specified, then it will not reload, it will just go to the top of the page...
e.g. I have this link on my page:
<a href="#" onClick="MyWindow=window.open('window/glucotrend.html','MyWindow','toolbar=no,width=450, height=450');return true;"><img src="products/gluco_hand.jpg" width="98" height="98"></a>
When you you click this link, a window 450 x 450 pops up and calls 'window/glucotrend.html'. When you use that # alone, the page will go to the top of the page, whilst the window is poping up. However you can name those # (known as body tags) as alph explained.
The # can be used to link parts of the same page. It can also be used to link something that will not touch the existing page (similar to the example I gave you above)
Hope this helps!
To refresh page automatically you must do this:
<Meta http-equiv="Refresh" content="XXX;URL=http://www.yoursite.com/page.html">
XXX is the number of seconds to refresh automatically.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.