Need code for Q & A page please

Discussion in 'HTML & Website Design' started by nancyml, Jul 26, 2010.

  1. #1
    I would like to have a Q & A page on my website with the questions at the top of the page and when the user clicks on the question it will bring them to the answer on the bottom of the page. I'm using Frontpage 2003.
     
    nancyml, Jul 26, 2010 IP
  2. hes

    hes Peon

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Simple Sample:
    
    <a href="#answer1">Question 1</a>
    <span id="answer1">Answer 1</span>
    
    HTML:
    You could change <span> with whatever you want... { <div><h1><h2><h3><h4><h5><h6>... }
     
    hes, Jul 26, 2010 IP
  3. nancyml

    nancyml Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I'm new to website design but trying. Where do I enter the code? Both lines at the end of Question 1 and the also the answer and then change to questions 2 and answer 2 and so on?
     
    nancyml, Jul 26, 2010 IP
  4. hes

    hes Peon

    Messages:
    37
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    It goes like this:
    
    <a href="#answer1">Question 1</a><br />
    <a href="#answer2">Question 2</a><br />
    <a href="#answer3">Question 3</a><br />
    --------------------------------------------
    <dl>
       <dt id="answer1">Answer 1 Title</dt>
       <dd>Answer 1 Description</dd>
       <dt id="answer2">Answer 2 Title</dt>
       <dd>Answer 2 Description</dd>
       <dt id="answer3">Answer 3 Title</dt>
       <dd>Answer 3 Description</dd>
    </dl>
    
    HTML:
    I used <dl> tag which is a description list considering you wanted a Q & A like a FAQs page.
    Basically the <a> tag with href of "#something", when clicked will make the page jump to the element with "something" as its ID. This can be anywhere on the page.
     
    hes, Jul 26, 2010 IP
  5. nancyml

    nancyml Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Perfect! Thank you so much! You are the great HTML guroo!!!
     
    nancyml, Jul 26, 2010 IP