Jump to content

Archived

This topic is now archived and is closed to further replies.

OriginalSunny

FAQ's on many websites.

Recommended Posts

Hi,
I have been looking on a number of websites and seen that in their FAQ sections they have links to the answers to their questions. The thing is how do they create the link so it goes to the answer on a certain part of the same page?? The only thing i know is to create a link to another page not at a different part of the same page. If you know how to do this please let me know as i am creating an FAQ section for my website.
Thanks.

Share this post


Link to post
Share on other sites
This is not PHP but more towards HTML if I am reading your post correctly. You usually see this type of thing on long pages that scoll quite far down the page. Such as a link that says Go to TOP at the bottom of a page. Then you'll place at the top of your page (just before the body tag).
[code]<a name="top"></a>[/code]

The code below is the linked that'll be a placed at the bottom of the page.
[code]<a href="#top">Go to Top of page</a>[/code]

If you have long page where you have to scrol then you click the Goto top of page link and it'l autotmatically go to the top of the page. This is the same affect that FAQ's use.

Heres an example:
[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title></title>
</head>
<body>
<a name="top"></a>
<a href="#bottom">Go to bottom</a>
<h1 style="margin-bottom: 2000px;">Top of Page</h1>
<a name="bottom"></a>
<a href="#top">Top of Page</a>
</body>
</html>[/code]
If you click the link [i]Go to bottom[/i] it'll go to the bottom of the. Same applies to the [i]Go to Top[/i] link at the bottom but it goes to the top.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.