Posted on 2003-12-06
Last Modified: 2010-04-09
what does # mean?

i saw the syntax -->   <a href="page.html#layer">

Thank you guys
Question by:wilslm
LVL 33

Expert Comment

ID: 9888760
It means to go to the anchor with name "layer".

LVL 33

Expert Comment

ID: 9888763
LVL 33

Expert Comment

ID: 9888770
check out anchor name

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.


Expert Comment

ID: 9888771
It is used to have links on the same page. So somewhere in the source of page.html is a
<a name="layer"></a>

And by clicking on the link "page.html#layer" you will have that exact place on the page in your browser, not just the top of that page.

Expert Comment

ID: 9888994
If you want to create links within a page you can accomplish it by using <a href="page.html#layer">
A small example for you to make it understand better

<a href="page.html#book1">Go to book 1 section</a>   : When you click this link it will take you to a book 1 section on page even if its all the way on the bottom of the page
<a href="page.html#book2">Go to book 2 section</a>
<a href="page.html#book3">Go to book 3 section</a>

<a name="book1">Book 1 section</a>
<a name="book2">Book 1 section</a>
<a name="book3">Book 1 section</a>
LVL 11

Accepted Solution

Zontar earned 125 total points
ID: 9889575
It is also used sometimes to create a "dummy" link for scripting purposes, e.g.

<p><a href="#" onclick="alert("Hi there!");">Click here for a useless message</a>.</p>
LVL 16

Expert Comment

ID: 9894478
assuming Zonstar ;) forgot to return false on an accident

<p><a href="#" onclick="alert("Hi there!");return false;">Click here for a useless message</a>.</p>

LVL 16

Expert Comment

ID: 9894480
and used double quota's in a single quotas place

<p><a href="#" onclick="alert('Hi there!');return false;">Click here for a useless message</a>.</p>

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
document.write() deleting all existing HTML 5 52
jQuery Sticky Menu 24 36
Can't get container centered 4 24
Html form and modal / img src -problem 3 30
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question