Forums > Build, Make or Create your own Website > How to Link to a Specific Spot on a Page - Another Approach
|
When you are designing your website, you may have a requirement to link to a specific spot on a page and there is another way other than the XHTML compliant way to link within a page approach.
The Old Way
This way of jumping to a spot within a page is not as good an idea for a few reasons. The "name" attribute has been depreciated for XHTML, and using tags you already have on your page like <h1>, <p> or any other places you can add id's will leave you less clutter on your page. (i.e, you can use them for css styles, javascript and a lot more.)
With that said, just in case for some reason you want to try the other way, here it is. As with the linking method, you can call it anything you'd like, try not to use spaces though as they look rather messy in an address bar.
1) Naming the Target
Choose a spot on the page you want to link to and make an anchor by making a link mostly as usual but instead of "href" add "name" inside it.
Here's an example:
<a name="whatever-you-want-to-call-it">something here so you don't have an empty tag</a>
2) Linking to your new jump spot
This step is the same as for the previous method:
<a href="#whatever-you-want-to-call-it">Link Text Here</a>
See, either way you choose to link within the page it's fast, easy and can be very helpful to your visitors.
View More: [ 01 ][ 02 ] |
| Build a web site | Website Management Technology | Website Services |
|
|
|
|
| Website CMS Solutions | Website CMS Applications | |
|
|
|
|
| Business Opportunities | Customer Service | Company |
|
|
|
|
Website design by AJIBOYE. Website powered by ASD Website Automation CMS+ v. 3.06.00
© Copyright. AJIBOYE. All rights reserved