Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Poll HTML Markup

Reply
Thread Tools

Poll HTML Markup

 
 
shapper
Guest
Posts: n/a
 
      09-25-2008
Hello,

I am displaying a poll to a user that has 1 question and 4 answers. I
am using the following HTML markup:

<h3>Question</h3>
<ul>
<li>Answer 1</li>
<li>Answer 2</li>
<li>Answer 3</li>
<li>Answer 4</li>
</ul>

Is this correct? Should I also place the Question in a list item
dropping the header?

Or maybe using a <p> for the question?

Thanks,
Miguel
 
Reply With Quote
 
 
 
 
Els
Guest
Posts: n/a
 
      09-25-2008
shapper wrote:

> I am displaying a poll to a user that has 1 question and 4 answers. I
> am using the following HTML markup:
>
> <h3>Question</h3>
> <ul>
> <li>Answer 1</li>
> <li>Answer 2</li>
> <li>Answer 3</li>
> <li>Answer 4</li>
> </ul>
>
> Is this correct? Should I also place the Question in a list item
> dropping the header?
>
> Or maybe using a <p> for the question?


I think I'd go for using a <p> for the question, and have the <h3> (or
whichever level of heading is appropriate for it) saying something
like "Poll". It's not a crime to place the question in the <h3>
though, just don't use it in the list, as it is not part of the list.

--
Els http://locusmeus.com/
 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      09-25-2008
Els wrote:
> shapper wrote:
>
>> I am displaying a poll to a user that has 1 question and 4 answers. I
>> am using the following HTML markup:
>>
>> <h3>Question</h3>
>> <ul>
>> <li>Answer 1</li>
>> <li>Answer 2</li>
>> <li>Answer 3</li>
>> <li>Answer 4</li>
>> </ul>
>>
>> Is this correct? Should I also place the Question in a list item
>> dropping the header?
>>
>> Or maybe using a <p> for the question?

>
> I think I'd go for using a <p> for the question, and have the <h3> (or
> whichever level of heading is appropriate for it) saying something
> like "Poll". It's not a crime to place the question in the <h3>
> though, just don't use it in the list, as it is not part of the list.
>


Style as you wish:

p.question { font-size: 1.25em; font-weight: bold; }
ul.answers { ... }

<h1>The Foo Poll</h1>
<p class="question">Question....?</h3>
<ul class="answers">
<li>Answer 1</li>
<li>Answer 2</li>
<li>Answer 3</li>
<li>Answer 4</li>
</ul>


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Adrienne Boswell
Guest
Posts: n/a
 
      09-25-2008
Gazing into my crystal ball I observed shapper <(E-Mail Removed)>
writing in news:187596bf-a3cd-46a6-8a85-f527b53ea459@
25g2000hsx.googlegroups.com:

> Hello,
>
> I am displaying a poll to a user that has 1 question and 4 answers. I
> am using the following HTML markup:
>
><h3>Question</h3>
><ul>
> <li>Answer 1</li>
> <li>Answer 2</li>
> <li>Answer 3</li>
> <li>Answer 4</li>
></ul>
>
> Is this correct? Should I also place the Question in a list item
> dropping the header?
>
> Or maybe using a <p> for the question?
>
> Thanks,
> Miguel


This would be a good candidate for a definition list, eg:

<dl>
<dt>What is the not color of an apple?</dt>
<dd>Red</dd>
<dd>Green</dd>
<dd>Blue</dd>
<dd>Yellow</dd>
</dl>

--
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
 
Jukka K. Korpela
Guest
Posts: n/a
 
      09-25-2008
Adrienne Boswell wrote:

> This would be a good candidate for a definition list, eg:


No it wouldn't.

> <dt>What is the not color of an apple?</dt>


Why do you claim that "What is the not color of an apple?" is a term that
you are defining? It ain't no term. It's a question. Well, a grammatically
malformed question, but still. It does not even _contain_ a term, just
common English words.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      09-25-2008
shapper wrote:

> I am displaying a poll to a user that has 1 question and 4 answers.


Why do you call it a poll? Is this a _presentation_ of a poll (in a document
_about_ some study)? Or is it supposed to _be_ a poll? If it is, where does
the user enter his answer? If this is really part of a form, you should say
it, since it really matters, for markup purposes and otherwise.

> <h3>Question</h3>


Do you have 1st and 2nd level headings at higher structure levels? If not,
you should not use markup for a 3rd level heading.

"Question" is seldom a good heading. Yes, you meant it as a placeholder, but
it is all-important what kind of questions you _really_ have there. If they
are short, you could make them headings at a suitable level. Otherwise, you
should perhaps use short headings that describe the topic of the question,
followed by a paragraph (or maybe <div>) that contains the question itself.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Adrienne Boswell
Guest
Posts: n/a
 
      09-25-2008
Gazing into my crystal ball I observed "Jukka K. Korpela"
<(E-Mail Removed)> writing in
news:yROCk.71333$(E-Mail Removed) .fi:

> Adrienne Boswell wrote:
>
>> This would be a good candidate for a definition list, eg:

>
> No it wouldn't.
>
>> <dt>What is the not color of an apple?</dt>

>
> Why do you claim that "What is the not color of an apple?" is a term
> that you are defining? It ain't no term. It's a question. Well, a
> grammatically malformed question, but still. It does not even
> _contain_ a term, just common English words.
>


Bad choice of question and answer, I agree. However, I still think that
a definition list would work here. After all, a question and answer are
a name/value pair, and a word/definition(s) are also a name/value pair.

In reality, the OP would be better off with a label and radio or check
box inputs.


--
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
 
Harlan Messinger
Guest
Posts: n/a
 
      09-25-2008
Jukka K. Korpela wrote:
> Adrienne Boswell wrote:
>
>> This would be a good candidate for a definition list, eg:

>
> No it wouldn't.
>
>> <dt>What is the not color of an apple?</dt>

>
> Why do you claim that "What is the not color of an apple?" is a term
> that you are defining? It ain't no term. It's a question. Well, a
> grammatically malformed question, but still. It does not even _contain_
> a term, just common English words.
>


In the spec I don't see:

"The name 'definition list' is meant literally and strictly and should
only be used for the very special case of providing definitions for
words, even though all of you will be hard-put to figure out why we'd
create a special structure just for that one extremely narrow purpose."

but I do see

"Another application of DL, for example, is for marking up dialogues,
with each DT naming a speaker, and each DD containing his or her words."

which contradicts the notion that "definition list" was meant to be
construed strictly, instead of based on its convenience as a term
understood to connote this kind of general data structure, akin to the
Dictionary object available in at least one programming library, which
is nothing more than a map or hash table, and which is probably only
very rarely used for the purpose of matching up terms to definitions.
 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      09-25-2008
Harlan Messinger wrote:

> In the spec I don't see:
>
> "The name 'definition list' is meant literally and strictly


Bla bla. It still says <dl> is a definition list, and you can check any
decent dictionary for a definition for "definition" if the word is not known
to you.

> which contradicts


It has been said umpteen times that the HTML specs is self-contradictory in
this issue and a few others. It still defines <dl> as definition list, even
though it then contradicts, in descriptive prose, its own normative
definition.

The practical side of the matter is that it is more difficult to style a
<dl> than some other markup for a list of Q/A pairs.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

 
Reply With Quote
 
Chris F.A. Johnson
Guest
Posts: n/a
 
      09-25-2008
On 2008-09-25, Jukka K. Korpela wrote:
> Harlan Messinger wrote:
>
>> In the spec I don't see:
>>
>> "The name 'definition list' is meant literally and strictly

>
> Bla bla. It still says <dl> is a definition list, and you can check any
> decent dictionary for a definition for "definition" if the word is not known
> to you.


The definitions given in my dictionaries could easily include
questions and answers.

>> which contradicts

>
> It has been said umpteen times that the HTML specs is self-contradictory in
> this issue and a few others. It still defines <dl> as definition list, even
> though it then contradicts, in descriptive prose, its own normative
> definition.
>
> The practical side of the matter is that it is more difficult to style a
><dl> than some other markup for a list of Q/A pairs.


That's news to me; I've never seen any difficulty in styling them.


--
Chris F.A. Johnson, webmaster <http://Woodbine-Gerrard.com>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
 
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
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
Poll Markup. Where should I place the question? shapper HTML 3 10-08-2008 04:04 PM
[ANN] deplate 0.7.1 - A tool for converting documents written inan unobtrusive, wiki-like markup to LaTeX, HTML, "HTML slides", or DocBook Thomas Ruby 0 03-03-2005 06:36 PM
How to strip HTML markup from string? Michal A. Valasek ASP .Net 2 08-12-2003 06:39 AM



Advertisments