Anchor tag with a pound sign RRS feed

  • Question

  • The anchor tag with a pound sign

    <a href="#">Home</a>

    Before I alter my dwt, I want to be sure I've got this straight. If I use href="#" that means the menu tab will react like it is a hyperlink; BUT if a user clicks that tab - they won't go anywhere.

    Is this correct?

    Mark Flynn http://www.MarkFlynn.biz/
    Friday, June 17, 2011 3:32 AM

All replies

  • Depends on the browser, most of them will take the visitor to the top of the page. If you want a hyperlink that goes nowhere use <a href="javascript;;"> which will create a null link. The # is used for in page links.
    Free Expression Web Tutorials
    For an Expression Web forum with without the posting issues try expressionwebforum.com
    • Marked as answer by luckymaf Sunday, June 19, 2011 2:11 PM
    • Unmarked as answer by luckymaf Sunday, June 19, 2011 3:07 PM
    Friday, June 17, 2011 3:43 AM
  • Hi Cheryl:

    Using href="javascript;;" resulted in a page error with "Internet explorer cannot display the webpage".  So because my drop-down menu tabs are close to the top of the page, I'll use href="#".

    Your time and expertise is greatly appreciated.

    Mark Flynn http://www.MarkFlynn.biz/
    btw - I'm using pure css to construct my drop-down menu.
    • Edited by luckymaf Friday, June 17, 2011 4:42 AM after thought
    Friday, June 17, 2011 4:22 AM
  • There is a typo in your href=javascript

    Shouldn't the null link be <a href="javascript:;">   (colon semicolon) ?

    Mark Flynn http://www.MarkFlynn.biz/
    Sunday, June 19, 2011 3:06 PM