<labels> are not compulsory. I donât always use them with <input> and my markup still passes as xhtml strict.
Neither are <h1>header text</h1> in place of
<p><strong><font size=20px>header text</font></strong></p>
BUT most of us would argue one is correct on a number of levels, while the other one is code that one should be so ashamed of that they should lock themselves up in the attic and remain there until all who know them have died off or moved away : )
Also, if youâre not using labels then youâre blocking content from users of some screen readers, because labels are form controls while plain text is not. This is why they are required in WCAG and why they were invented in the first place.
W3Cschools was incorrect about the clip property⌠I remember someone (Ryan Reese?) coming here confused why their code wasnât working because instead of reading the W3C specs, they read W3schools site, which at the time said elements needed to be positioned or positioned relatively (though their code example is the same as now, with position: absolute) which they have since corrected.
This page explains more and better: http://www.w3.org/TR/CSS21/visufx.html#propdef-clip
however neither page mentions The Big IE Bug (I can understand W3C not mentioning it because they only state proscriptive, not descriptive, but W3schools should have mentioned it!): The commas make clip break entirely in IE6 and 7 (not sure about 8 or 9). Browsers remember the older, ambigious specs where commas were not mentioned and so accept it, BUT IE is the one who insists on no commas. There are a good hundred other sites who do explain this.
I would treat w3schools like wikipedia: if you need quick information thatâs not necessarily accurate, you can go there, but if you need absolutely correct information, you go to the source (really, wikipediaâs real use is that there are sources, though I always get bummed to find the web sources being 404).
If using transitional, the only error the validator picked up in one of the sample codes is a missing âactionâ attribute in the <form> which in the context of the code being to demonstrate the <input> element, I can see why it was omitted.
If using Transitional, the font tag I used above also isnât flagged. Transitional lets you put any type of garbage code you want on a web page⌠frankly Iâm not sure thereâs any real reason to bother validating stuff written for a Transitional doctype⌠maybe for mismatched tag nesting, little more.
If youâre using a Strict doctype, you cannot have inline elements directly in a form (I think HTML5 was changing this since all the HTML5 form examples I see donât have a block child⌠BUT then many of the HTML4 examples also donât have it and there they are incorrect), so either a div or a fieldset (or pâs as the old specs have it) are necessary.
After getting burned by information of a few elements on w3schools, I was shown the specs (and better sites like HTMLdog) and I havenât gone back to w3schools⌠however I canât comment on their Javascript accuracy.