How to Link to a Specific Spot on a Page Helpful tips, conversations and pointers on how to build, make or create your own small business website solution. How to build a website resources. Use guides to create your own website.
Brand. Website. Business. Build Yours!
Call us toll free +1 (800)-548 9824 for your full service small business website solution: website management technology, services, and support. Build a website today!
Brand. Website. Business. Build Yours!
Brand. Website. Business. Build Yours!
Brand. Website. Business. Build Yours!
Brand. Website. Business. Build Yours!
Brand. Website. Business. Build Yours!
Brand. Website. Business. Build Yours!

Forums  >  Build, Make or Create your own Website  >  How to Link to a Specific Spot on a Page

How To Link To A Specific Spot On A Page

Published on 01/28/2010 by Wayne Foster
When you are designing your website, you may have a requirement to link to a specific spot on a page. Or maybe you want to add a link back to the top so they can get back to your navigation menu or any other area within the page? Targeting within a page is very easy.
 
The XHTML Compliant Way to Link Within a Page
XHTML compliant means that it will help your pages validate as XHTML Strict, the old way will not pass. This method is just as easy as the older link jump and when you continue getting better at designing you will probably be glad you did it this way in the first place as there is no messy editing later.
 
1) Name the Target
Choose the exact spot you want to send your link to, choose and element near it, such as a div, header tag, paragraph, it does not matter as long as it's in the right spot. Add id="something", you can call them anything you like as long as the names are the same in the link and the target ID and preferably no spaces (spaces change to %20 in the address bar and look a tad messy).
 
An example would look like this:
 
<div id="whatever-you-want-to-call-it">
The content of your div here.
</div>
 
2) Link To Your Anchor Target
To link to your anchor simply use:
 
<a href="#whatever-you-want-to-call-it">Link Text Here</a>
 
or if it's on another page:
 
<a href="pagename.html#whatever-you-want-to-call-it">Link Text Here</a>

    Post A Comment

Wayne Foster
Posted:January 28, 2010 Subject: How to Link to a Specific Spot on a Page Comment

When you are designing your website, you may have a requirement to link to a specific spot on a page. Or maybe you want to add a link back to the top so they can get back to your navigation menu or any other area within the page? Targeting within a page is very easy.

 

The XHTML Compliant Way to Link Within a Page

XHTML compliant means that it will help your pages validate as XHTML Strict, the old way will not pass. This method is just as easy as the older link jump and when you continue getting better at designing you will probably be glad you did it this way in the first place as there is no messy editing later.

 

1) Name the Target

Choose the exact spot you want to send your link to, choose and element near it, such as a div, header tag, paragraph, it does not matter as long as it's in the right spot. Add id="something", you can call them anything you like as long as the names are the same in the link and the target ID and preferably no spaces (spaces change to %20 in the address bar and look a tad messy).

 

An example would look like this:

 

<div id="whatever-you-want-to-call-it">

The content of your div here.

</div>

 

2) Link To Your Anchor Target

To link to your anchor simply use:

 

<a href="#whatever-you-want-to-call-it">Link Text Here</a>

 

or if it's on another page:

 

<a href="pagename.html#whatever-you-want-to-call-it">Link Text Here</a>

Basic Website CMS Solution
Business Website CMS Solution
Ecommerce Website CMS Solution
$ 7.95 domain name registration.
Build your complete web solution: Brand, Website, Business.
Buy your domain name
New 1 Year Registrations just $ 7.95!
Multi-year Registrations, Renewals, & Transfers just $ 7.95/year!
Brand. Website. Business. Build Yours!
Build a web site Website Management Technology Website Services
Website CMS Solutions Website CMS Applications
Business Opportunities Customer Service Company
AJIBOYE is a website solutions provider serving Connecticut (CT), New York (NYC), New Jersey (NJ) and nationwide!

Website design by AJIBOYE. Website powered by ASD Website Automation CMS+ v. 3.06.00
© Copyright. AJIBOYE - Brand. Website. Business. Build Yours!. All rights reserved

Comodo SSL Certificate
AJIBOYE. Brand. Website. Business. Build Yours!Build A WebsiteCompany InformationCompare Website Content Management SystemsMedia Website CMS SolutionMLM Website CMS SolutionBuild A Website Business Website Purchasing GuideWeb Page BuilderForums ManagerMagazine ManagerShopping CartBusiness Directory ManagerForums ManagerBuild A Website Instant QuoteAnimation DesignBrand DesignPartner RegistrationPut The Internet To Work For You Build Your Brand.