Code critique (again)

R

Ryan Stewart

I asked previously for comments on this code, but some confusion and
possibly a lost post led to my receiving nothing but a couple of accusations
of trolling. I apologize for the confusion. The link:
http://68.184.224.2:8080/reference/form8001.jsp

It's just bare bones at the moment. I've shown different colored borders so
I can see where my boxes are. I'm not looking for criticism on the layout of
the page. That is already set. The page looks the way it needs to (minus
some CSS decoration, of course). I'm looking for comments on the markup I
used to generate this structure. Is it correct? How could it be better? The
page validates HTML 4.01 Strict at the W3 site.
 
R

Ryan Stewart

Toby A Inkster said:
Could probably do with some use of <label>.
Interesting. I didn't even know that tag existed. I've read over its
description at W3 now. Is it widely used? Is it worth the extra bandwidth?
What are the benefits of using it? That page is only a sample of the actual
form which will be dynamically generated and could easily have hundreds of
input elements. Adding label tags to each of those could add several
kilobytes to the file size.
 
D

David Dorward

Ryan said:
Interesting. I didn't even know that tag existed. I've read over its
description at W3 now. Is it widely used?

On webpages? No.
By browsers? Yes.
Is it worth the extra bandwidth?
Yes.

What are the benefits of using it?

Bigger click targets (especially for radio buttons and check boxes)
Assistive software gets explit information about what text describes a
field, rather then having to guess.
That page is only a sample of the
actual form which will be dynamically generated and could easily have
hundreds of input elements. Adding label tags to each of those could add
several kilobytes to the file size.

mod_gzip is quite fun :), but if the page is that big already, I would
seriously consider using a multipage form.
 
T

Toby A Inkster

Ryan said:
Interesting. I didn't even know that tag existed. I've read over its
description at W3 now. Is it widely used? Is it worth the extra bandwidth?
What are the benefits of using it?

It is pretty good. The practical benefit for most people is that clicking
in the label text is treated like clicking on the label control. (This is
particularly useful for checkboxes and radio buttons.)

Example:
http://www.nctpregnancyandbabycare.com/nct-online/questionnaire/
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top