+ 1
How does <a href="#"> Work?!
I seen a code where it didn't have any J.s and they used <a href="#id"> as onclixk event. I tried doing it and it didn't work... And on this code I was working on, I had <a href="#"> Ginfio </a>. When you click on Ginfio, the screen moves up and I'm not sure how it's doing that. Here's the code, click on Ginfio and the 'Ginfio' is all the way @the bottom. Click on it and you'll see the screen move. How? https://code.sololearn.com/WIMW1B0B2R6T/?ref=app It's not a big deal that the screen is moving, I'm just curious how it is moving with #.
3 Respuestas
+ 6
# is used to go to a certain element with a specific id. But just a hash is basically a link to the top of your page.
+ 4
Example. <p id="first">
<a href="#first">
0
ahh, make sense.