W3C home > Mailing lists > Public > www-validator@w3.org > January 2005

<label> in paragraph tag

From: David R. Stong <drs18@psu.edu>
Date: Wed, 19 Jan 2005 17:27:17 -0500
Message-Id: <p0611040fbe148c3f6f8c@[]>
To: www-validator@w3.org

I recently tried switching my DOCTYPE to XHTML 1.0 Strict. It had 
been Transitional.

To comply with accessibility standards I use <label> elements for 
<input> elements in all <form>s. Now, those <label> elements will not 
validate. The Markup Validator says <label> is not allowed in that 
position. If  I nest the form's contents inside a <p></p> tag, then 
place the <form<</form> around the <p></p>, the page validates.

I can't find anything in the DTD or XHTML standard that explains 
this. I think it's a bug, but thought a general query may save you 
folks time in the event a <p> is explainable...

David R. Stong
Multimedia Specialist 3

Education Technology Services, a small unit within
Information Technology Services, at
The Pennsylvania State University
212  Rider Building II
State College, PA   16801-4819
Received on Thursday, 20 January 2005 04:41:25 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:44 UTC