href to link to another spot on a page and redirect the page to that spot
I am trying to redirct the user to another spot on the page, when they click on the <a>, can I do that this way
6 Replies
yes, these are called
named anchors
or bookmark links
The href starts with #
and has the id
of the element you want to go to
With this method you can also navigate to a specific place on another page
for example: <a href="contact.html#form">Contact form</a>
but can i use it to another spot on the same page
yea, that's what i said
sry its just not working
im trying to get the navi to go to #developer
when the user clicks developer in the <a>
make a codepen please
a wait, developer div id is starting with a
#
, that is not necessary. only on the link
(sorry, did not spot that on first sight)
so it should be:
o
it was a spelling error
ops
thanks