logo

New Response

« Return to the blog entry

You are replying to:

    • avatar
    • Ferdy
    • Posted on Thu 13 Jan 2011 02:55 AM

    I'm with the semantic guys on this one. You're making the input a child element of a label. Conceptually this is not correct.

    I agree that in practice there is little harm to it though. The only downside of this method is that you become less flexible in repositioning elements through CSS since you have explicitly created this parent-child relationship. Any repositioning of your label will now also reposition your input. I'm sure it won't matter much in this case.

    I would never preach semantics for the sake of semantics alone, but there definitely are real world advantages to semantic markup, the most important ones being flexibility, maintainability and how well search engines and screen readers can interpret the markup. So unless there is a very strong reason for non-semantic markup, I'd go for semantic markup. I really don't see what the big win is of not having to supply "id" atributes.

    Just my 2 cents...

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: