Explaining “#” | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Explaining “#”

I thought when you put “#” in place of where an actual link goes, like this- <a href=“#”> that it creates a dead link and is still clickable, but doesn’t load anything. However, in the last example I did the webpage was reactive and the tag that had <a href=“#”> had an active link. I’m confused on how that is possible if the link is considered dead.

20th Mar 2019, 2:57 AM
Brianna
3 Answers
+ 8
Basically # is used to create internal links. By internal links, I mean to link parts of same webpage in the webpage.
20th Mar 2019, 3:57 AM
Arushi Singhania
Arushi Singhania - avatar
+ 2
# also called target, scrolls the page to the top. And if you have <div id="main"> and target as <a href="#main"> scrolls the page to that main content. To navigate to other links or pages with Dead links probably JavaScript was used to open new location.href function
20th Mar 2019, 3:11 AM
Niush
Niush - avatar
0
thank you
20th Mar 2019, 8:36 PM
Brianna