Jump to content
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble
Strawberry Orange Banana Lime Leaf Slate Sky Blueberry Grape Watermelon Chocolate Marble

MSFN is made available via donations, subscriptions and advertising revenue. The use of ad-blocking software hurts the site. Please disable ad-blocking software or set an exception for MSFN. Alternatively, register and become a site sponsor/subscriber and ads will be disabled automatically. 


Sign in to follow this  
kali

How to set a link in same page

Recommended Posts

I want to set a link in same page that locate definite section or line in same page (which use #). For example MS link

Share this post


Link to post
Share on other sites

Guest

<a href="#something">link to something</a>

<a name="something"></a>

  • Upvote 1

Share this post


Link to post
Share on other sites
<a href="#something">link to something</a><a name="something"></a>

Excellent. It's working fine. MS link used id instead of name code. But both are working to me.

Share this post


Link to post
Share on other sites
Guest

Yeah "id" works too. It's a later super strict standard if I'm recalling correctly. Might not work with older browsers.

  • Upvote 1

Share this post


Link to post
Share on other sites

Should probably do a bit of Feature Detection to make sure the correct one is used. ;)

 

Edit: Oh wow, just realized how old all these topics are. Whoops.

Edited by war59312

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×