
What is href="#" and why is it used?
2 Answers By Expert Tutors

Perry M. answered 05/31/19
Professional Web Application Developer
The # is usually used with some sort of an id to link to a section of a page. For instance, consider the following HTML layout:
In this example, clicking on href="#mySection" would bring you to the smaller section. It can be especially useful for one page website layouts where it continually scrolls.
Using href="#" would also generally bring you to the top of the page.

Eduardo T. answered 03/17/19
Self-Taught Web Developer (HTML/CSS, JavaScript)
Hi, Rashawn!
In HTML, the href attribute is used to define a URL to be opened when the element is clicked. In developmental stages (as opposed to production), developers use the "#" symbol to simulate a linking effect but that doesn't redirect anywhere.
However, if there is another element in your HTML with an id, using the "#" symbol followed by the element's id would execute a window scroll to the element with said id.
Still looking for help? Get the right answer, fast.
Get a free answer to a quick problem.
Most questions answered within 4 hours.
OR
Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.
Steph R.
This was answered well by Perry. Just to put a finer point on it, if you wanted to share an event with a client or friend and your webpage is long and there's a lot of information to wade through you could send the #sectionname along with the URL of the website (assuming you've coded it this way). nameofyourwebsite.com/index.html#events If it's coded properly the page will load and "jump" to the events section automatically so your friend can quickly find the exact area of the page you mentioned.08/12/19