Poll Markup. Where should I place the question?

Discussion in 'HTML' started by shapper, Oct 8, 2008.

  1. shapper

    shapper Guest

    Hello,

    I am creating a poll using the following markup:

    <p>Question</p>
    <form>
    <fieldset>
    <ol>
    <li><input id="option1" type="radio" name="Answer 1"
    value="Answer 1" /></li>
    <li><input id="option2" type="radio" name="Answer 2"
    value="Answer 2" /></li>
    </ol>
    </fieldset>
    <fieldset class="Action">
    <input id="Vote" type="submit" value="Vote" name="Action.Vote"/>
    </fieldset>
    </form>

    I think my markup is ok but should I place the Question inside a
    legend in the fieldset?
    <form>
    <fieldset>
    <legend>Question</legend>
    <ol>
    <li><input id="option1" type="radio" name="Answer 1"
    value="Answer 1" /></li>
    <li><input id="option2" type="radio" name="Answer 2"
    value="Answer 2" /></li>
    </ol>
    </fieldset>
    ....

    What do you think?

    Thanks,
    Miguel
    shapper, Oct 8, 2008
    #1
    1. Advertising

  2. Gazing into my crystal ball I observed shapper <>
    writing in news:61f5c58c-258f-4dbf-ab93-18952022c288
    @a19g2000pra.googlegroups.com:

    > Hello,
    >
    > I am creating a poll using the following markup:
    >
    ><p>Question</p>
    ><form>
    > <fieldset>
    > <ol>
    > <li><input id="option1" type="radio" name="Answer 1"
    > value="Answer 1" /></li>
    > <li><input id="option2" type="radio" name="Answer 2"
    > value="Answer 2" /></li>
    > </ol>
    > </fieldset>
    > <fieldset class="Action">
    > <input id="Vote" type="submit" value="Vote" name="Action.Vote"/>
    > </fieldset>
    ></form>
    >
    > I think my markup is ok but should I place the Question inside a
    > legend in the fieldset?
    ><form>
    > <fieldset>
    > <legend>Question</legend>
    > <ol>
    > <li><input id="option1" type="radio" name="Answer 1"
    > value="Answer 1" /></li>
    > <li><input id="option2" type="radio" name="Answer 2"
    > value="Answer 2" /></li>
    > </ol>
    > </fieldset>
    > ...
    >
    > What do you think?
    >
    > Thanks,
    > Miguel
    >


    I would maybe do something like:

    <form>
    <fieldset><legend>Part I</legend>
    <label>Question 1</label>
    <ol>
    <li><input id="option1" type="radio" name="Answer 1" value="Answer
    1" /></li>
    <li><input id="option2" type="radio" name="Answer 2" value="Answer
    2" /></li>
    </ol>
    <label>Question 2</label>
    ......
    </fieldset>
    <fieldset><legend>Part II</legend>
    ....
    </fieldset>
    </form>



    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Oct 8, 2008
    #2
    1. Advertising

  3. shapper

    shapper Guest

    On Oct 8, 3:06 pm, Adrienne Boswell <> wrote:
    > Gazing into my crystal ball I observed shapper <>
    > writing in news:61f5c58c-258f-4dbf-ab93-18952022c288
    > @a19g2000pra.googlegroups.com:
    >
    >
    >
    > > Hello,

    >
    > > I am creating a poll using the following markup:

    >
    > ><p>Question</p>
    > ><form>
    > >  <fieldset>
    > >     <ol>
    > >       <li><input id="option1" type="radio" name="Answer 1"
    > > value="Answer 1" /></li>
    > >       <li><input id="option2" type="radio" name="Answer 2"
    > > value="Answer 2" /></li>
    > >     </ol>
    > >  </fieldset>
    > >  <fieldset class="Action">
    > >     <input id="Vote" type="submit" value="Vote" name="Action.Vote"/>
    > >  </fieldset>
    > ></form>

    >
    > > I think my markup is ok but should I place the Question inside a
    > > legend in the fieldset?
    > ><form>
    > >  <fieldset>
    > >  <legend>Question</legend>
    > >     <ol>
    > >       <li><input id="option1" type="radio" name="Answer 1"
    > > value="Answer 1" /></li>
    > >       <li><input id="option2" type="radio" name="Answer 2"
    > > value="Answer 2" /></li>
    > >     </ol>
    > >  </fieldset>
    > > ...

    >
    > > What do you think?

    >
    > > Thanks,
    > > Miguel

    >
    > I would maybe do something like:
    >
    > <form>
    > <fieldset><legend>Part I</legend>
    > <label>Question 1</label>
    >   <ol>
    >      <li><input id="option1" type="radio" name="Answer 1" value="Answer
    > 1" /></li>
    >      <li><input id="option2" type="radio" name="Answer 2" value="Answer
    > 2" /></li>
    >   </ol>
    > <label>Question 2</label>
    > .....
    > </fieldset>
    > <fieldset><legend>Part II</legend>
    > ...
    > </fieldset>
    > </form>
    >
    > --
    > Adrienne Boswell at Home
    > Arbpen Web Site Design Serviceshttp://www.cavalcade-of-coding.info
    > Please respond to the group so others can share


    And if the poll has only one question?

    Your suggestion makes sense if I would have a questionnaire with many
    sections and each section having many questions.
    shapper, Oct 8, 2008
    #3
  4. Gazing into my crystal ball I observed shapper <>
    writing in news:6f6c26e2-f9a4-44a7-aaeb-7ecc9f673b0f@
    64g2000hsm.googlegroups.com:

    > On Oct 8, 3:06 pm, Adrienne Boswell <> wrote:
    >> Gazing into my crystal ball I observed shapper <>
    >> writing in news:61f5c58c-258f-4dbf-ab93-18952022c288
    >> @a19g2000pra.googlegroups.com:
    >>
    >>
    >>
    >> > Hello,

    >>
    >> > I am creating a poll using the following markup:

    >>
    >> ><p>Question</p>
    >> ><form>
    >> >  <fieldset>
    >> >     <ol>
    >> >       <li><input id="option1" type="radio" name="Answer 1"
    >> > value="Answer 1" /></li>
    >> >       <li><input id="option2" type="radio" name="Answer 2"
    >> > value="Answer 2" /></li>
    >> >     </ol>
    >> >  </fieldset>
    >> >  <fieldset class="Action">
    >> >     <input id="Vote" type="submit" value="Vote" name="Actio

    > n.Vote"/>
    >> >  </fieldset>
    >> ></form>

    >>
    >> > I think my markup is ok but should I place the Question inside a
    >> > legend in the fieldset?
    >> ><form>
    >> >  <fieldset>
    >> >  <legend>Question</legend>
    >> >     <ol>
    >> >       <li><input id="option1" type="radio" name="Answer 1"
    >> > value="Answer 1" /></li>
    >> >       <li><input id="option2" type="radio" name="Answer 2"
    >> > value="Answer 2" /></li>
    >> >     </ol>
    >> >  </fieldset>
    >> > ...

    >>
    >> > What do you think?

    >>
    >> > Thanks,
    >> > Miguel

    >>
    >> I would maybe do something like:
    >>
    >> <form>
    >> <fieldset><legend>Part I</legend>
    >> <label>Question 1</label>
    >>   <ol>
    >>      <li><input id="option1" type="radio" name="Answer 1" val

    > ue="Answer
    >> 1" /></li>
    >>      <li><input id="option2" type="radio" name="Answer 2" val

    > ue="Answer
    >> 2" /></li>
    >>   </ol>
    >> <label>Question 2</label>
    >> .....
    >> </fieldset>
    >> <fieldset><legend>Part II</legend>
    >> ...
    >> </fieldset>
    >> </form>
    >>
    >> --
    >> Adrienne Boswell at Home
    >> Arbpen Web Site Design Serviceshttp://www.cavalcade-of-coding.info
    >> Please respond to the group so others can share

    >
    > And if the poll has only one question?
    >
    > Your suggestion makes sense if I would have a questionnaire with many
    > sections and each section having many questions.
    >


    Then I would not use a fieldset at all. The fieldset element is for
    breaking up a form into sections, you are correct. The legend element
    is for the legend of the fieldset. The element you are looking for is
    the label element.

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
    Adrienne Boswell, Oct 8, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arne Styve
    Replies:
    22
    Views:
    1,089
    steve
    Feb 22, 2006
  2. shapper

    Where should I place this code?

    shapper, Jul 14, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    365
    bruce barker
    Jul 14, 2008
  3. shapper

    Poll HTML Markup

    shapper, Sep 25, 2008, in forum: HTML
    Replies:
    16
    Views:
    711
    dorayme
    Sep 27, 2008
  4. birdsong

    select.poll.poll() never blocks

    birdsong, Feb 12, 2009, in forum: Python
    Replies:
    2
    Views:
    443
    birdsong
    Feb 12, 2009
  5. Jean-Paul Calderone

    Re: select.poll.poll() never blocks

    Jean-Paul Calderone, Feb 12, 2009, in forum: Python
    Replies:
    3
    Views:
    433
    birdsong
    Feb 12, 2009
Loading...

Share This Page