Incase you did not know, but this blog runs on .Text with minor tweaks to the code. When I run this in the W3C Validator, I get 61 (wow!) errors back. If you examine the results of the validator some interesting things emerge.
Here is a listing of the issues I found:
- “End tag for element not found” – If you look at the source you will see that there is an open element and this is the corresponding end tag. So what am I missing? Per the validator, this error means: “The validator found an end tag, represented here by ‘FOO’, without a corresponding start tag. This frequently occurs in conjunction with the previous error. For instance, given <B><I>nope</B></I>, the validator will insert a </I> before the </B>, and then will find the </I> after the </B> and will have nothing to match it with.”
- “There is no Attribute ‘BLAH’” – Now all these attributes are used by the .NET framework, e.g. Name, Bordercolor, Height, etc. But in my (unofficial) testing, I did not find any issues with this on most of the browsers as most of them just ignore them. So, what is the “standard” here and the cause for concern? This brings up another interesting question, should Microsoft change the way the .NET runtime renders this to “fix” this? How does this compare to what JSP’s render?
- “Value of attribute “ID” invalid” – technically this is part of the above, but I was curious on what the issue is with the ID starting with an underscore (_)? I am at a loss there. Any thoughts?
- “ALT not Specified” – Now this is truely my fault for not adding that attribute to the images. Next build one can be assured this would be fixed. 🙂
- “An attribute value must be a literal unless it contains only name characters” – This is interesting. .Text uses an open source (I think) control called FreeTextBox by John Dyer, which is quite cool. Maybe the newer version of the control fixes this issue.
As you gathered, I am not really a HTML guy, I know enough aboout it, but don’t know the protocol by heart, nor do I plan on learning that. So go easy on me if some of my questions are very basic *grin*.
I would be interested to hear what you feedback is and what your experiences with this have been?