Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Poll Markup. Where should I place the question?

Reply
Thread Tools

Poll Markup. Where should I place the question?

 
 
shapper
Guest
Posts: n/a
 
      10-08-2008
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
 
Reply With Quote
 
 
 
 
Adrienne Boswell
Guest
Posts: n/a
 
      10-08-2008
Gazing into my crystal ball I observed shapper <(E-Mail Removed)>
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

 
Reply With Quote
 
 
 
 
shapper
Guest
Posts: n/a
 
      10-08-2008
On Oct 8, 3:06*pm, Adrienne Boswell <(E-Mail Removed)> wrote:
> Gazing into my crystal ball I observed shapper <(E-Mail Removed)>
> 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.
 
Reply With Quote
 
Adrienne Boswell
Guest
Posts: n/a
 
      10-08-2008
Gazing into my crystal ball I observed shapper <(E-Mail Removed)>
writing in news:6f6c26e2-f9a4-44a7-aaeb-7ecc9f673b0f@
64g2000hsm.googlegroups.com:

> On Oct 8, 3:06*pm, Adrienne Boswell <(E-Mail Removed)> wrote:
>> Gazing into my crystal ball I observed shapper <(E-Mail Removed)>
>> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
list(),tuple() should not place at "Built-in functions" in documentation Inside Python 10 07-20-2011 08:53 PM
select.poll.poll() never blocks birdsong Python 2 02-12-2009 07:14 AM
Re: select.poll.poll() never blocks Jean-Paul Calderone Python 3 02-12-2009 06:09 AM
Where should I place this code? shapper ASP .Net 1 07-14-2008 04:27 PM
Where should I place resource-files like images ? Arne Styve Java 22 02-22-2006 10:29 PM



Advertisments