What is the meaning of # in URL and how can I use that?

Url

Url Problem Overview


I often found some URL which looks like the following:

www.something.com/some_page/#someword

After writing this page some_page will be open and then scroll will be set so that I can see that "someword" at beginning of my screen.

I don't know what the meaning of "#" is. As soon as I make #someotherword with any URL it works sometimes and sometimes it doesn't.

I am not getting what # is in the URL. Is it any functionality of any language or URL or something else?

It might be possible that you consider my question newbish, but I am not into web-designing technologies, I am simply curious about it.

I am not the owner of some website, but when I am concerned with some particular portion of some web page then how can I give the URL with # and give that URL to another?

I am concerned with the answer portion on my profile, and then I will prepare the URL just below and will give it to somebody.

https://stackoverflow.com/users/775964/mr-32#answers

This works, but some time it doesn't.

https://stackoverflow.com/users/775964/mr-32#tags

That doesn't work.

I am just a user and I don't want to know in which language the website is build.

Url Solutions


Solution 1 - Url

Originally it was used as an anchor to jump to an element with the same name/id.

However, nowadays it's usually used with AJAX-based pages since changing the hash can be detected using JavaScript and allows you to use the back/forward button without actually triggering a full page reload.

Solution 2 - Url

This is known as the "fragment identifier" and is typically used to identify a portion of an HTML document that sits within a fully qualified URL:

Fragment Identifier Wiki Page

Solution 3 - Url

It is an anchor for links within a page - also known as "anchor tag"

http://www.w3.org/TR/html4/struct/links.html#h-12.2.3

Solution 4 - Url

It specifies an "Anchor", or a position on the page, and allows you to "jump" or "scroll" to that position on the page.

Please see this page for more details.

Solution 5 - Url

Apart from specifying an anchor in a page where you want to jump to, # is also used in jQuery hash or fragment navigation.

Solution 6 - Url

Yes, it is mainly to anchor your keywords, in particular the location of your page, so whenever URL loads the page with particular anchor name, then it will be pointed to that particular location.

For example, www.something.com/some_page/#computer if it is very lengthy page and you want to show exactly computer then you can anchor.

<p> adfadsf </p>
<p> adfadsf </p>
<p> adfadsf </p>
<a name="computer"></a><p> Computer topics </p>
<p> adfadsf </p>

Now the page will scroll and bring computer-related topics to the top.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJeegar PatelView Question on Stackoverflow
Solution 1 - UrlThiefMasterView Answer on Stackoverflow
Solution 2 - UrlDuncanView Answer on Stackoverflow
Solution 3 - UrlUdo HeldView Answer on Stackoverflow
Solution 4 - UrlrfmodulatorView Answer on Stackoverflow
Solution 5 - UrlHuskeView Answer on Stackoverflow
Solution 6 - UrlmannyView Answer on Stackoverflow