what is the fuction of '#'? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 2

what is the fuction of '#'?

What is the fuction of # ? <nav> <ul> <li><a href="#">Home</a></li> <li><a href="#">Services</a></li> <li><a href="#">About us</a></li> </ul> </nav>

13th May 2017, 11:21 AM
agung pramudji
agung pramudji - avatar
2 Answers
+ 6
It is a minimal relative link to actual page... If your page url is: http://mydomain.ext/index.html, so the absolute link of your <a>s tag is: http://mydomain.ext/index.html# wich is the format of an url to refer to a particular id in the page ( to auto-scroll to ). Setting with nothing folling, is a hack to use <a> link elements click event without reloading the page ^^
13th May 2017, 11:28 AM
visph
visph - avatar
+ 2
this means that the same side is the target. similar to a refresh
13th May 2017, 11:29 AM
Oliver