Jump to content

FAQ's on many websites.


OriginalSunny

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.
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.