tag:blogger.com,1999:blog-17809600565735611.post5146633480316770162..comments2023-03-25T12:39:46.494+01:00Comments on Itpastorn's Webdev + Thinkpad update & maintenance blog: Pedagogic validation of HTMLLars Gunther (itpastorn)http://www.blogger.com/profile/11544012919049072827noreply@blogger.comBlogger16125tag:blogger.com,1999:blog-17809600565735611.post-61558750883248068842011-02-08T00:57:23.703+01:002011-02-08T00:57:23.703+01:00Another note: One should not mix attributes that h...Another note: One should not mix attributes that have values and boolean attributes:<br /><br /><input type="password" required name="pw" /> = Bad!<br /><br /><input type="password" name="pw" required /> = Good!Lars Gunther (itpastorn)https://www.blogger.com/profile/11544012919049072827noreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-77582360696416397292010-06-12T12:21:14.392+02:002010-06-12T12:21:14.392+02:00Addendum to my last comment. (Yes I am using the b...Addendum to my last comment. (Yes I am using the blog to collect my own ideas.)<br /><br />Of course, subheadings, nicely wrapped in <hgroup>, are allowed.Lars Gunther (itpastorn)https://www.blogger.com/profile/11544012919049072827noreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-29270143101908382762010-06-12T11:52:46.821+02:002010-06-12T11:52:46.821+02:00Additional idea about what pedagogic validation co...Additional idea about what pedagogic validation could include:<br /><br />Mixing old school h1-h6 with sectioning elements should not be allowed. Thus there should be a warning if I have:<br /><br /><section><br /> <h1>Foo</h1><br /> <p>Lorem ipsum…</p><br /> <h2>Bar</h2><br /> <p>Dolor sit amet…</p><br /></section><br /><br />It should be written like this:<br /><br /><section><br /> <h1>Foo</h1><br /> <p>Lorem ipsum…</p><br /> <section><br /> <h2>Bar</h2><br /> <p>Dolor sit amet…</p><br /> </section><br /></section><br /><br />(Still using h2 to be backwards compatible.)<br /><br />Rule: Students should not mix the two ways of outlining a page, but pick one or the other.Lars Gunther (itpastorn)https://www.blogger.com/profile/11544012919049072827noreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-52535808830680014052010-02-15T11:13:52.142+01:002010-02-15T11:13:52.142+01:00http://mynthon.net/tools/xhtml-to-html5/ - this co...http://mynthon.net/tools/xhtml-to-html5/ - this convertes shows how html5 pages may look now.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-75056362308256493802009-12-03T17:18:03.703+01:002009-12-03T17:18:03.703+01:00More links:
1. Gareth Rushgrove also likes XHTML a...More links:<br />1. <a href="http://morethanseven.net/2009/07/08/thoughts-whole-xhtml-and-html5-affair/" rel="nofollow">Gareth Rushgrove also likes XHTML as a coding convention</a>.<br /><br />2. <a href="http://www.456bereastreet.com/archive/200912/html_5_syntax/" rel="nofollow">As does Roger Johansson</a>.<br /><br />3. <a href="http://www.zeldman.com/2009/11/26/a-zing-too-far/" rel="nofollow">We also get a few nice tidbits from Zeldman on what the issue really is</a>.Lars Gunther (itpastorn)https://www.blogger.com/profile/11544012919049072827noreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-27471011101051603502009-11-27T12:31:25.340+01:002009-11-27T12:31:25.340+01:00A few relevant links:
1. Sam Ruby on polyglot vali...A few relevant links:<br />1. <a href="http://intertwingly.net/blog/2009/09/02/Polyglot-Validation" rel="nofollow">Sam Ruby on polyglot validation</a><br /><br />2. <a href="http://robertnyman.com/2009/11/27/the-html5-syntax-options-problem/" rel="nofollow">Robert Nyman on strict syntax enforcement</a><br /><br />3. <a href="http://wiki.whatwg.org/wiki/Validator.nu_Useful_Warning_Requests" rel="nofollow">Validator.nu Useful Warning Requests</a>Lars Gunther (itpastorn)https://www.blogger.com/profile/11544012919049072827noreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-43643313933901280202009-11-12T23:04:53.133+01:002009-11-12T23:04:53.133+01:00@Lachlan:
Ampersands and equal signs within URLs s...@Lachlan:<br />Ampersands and equal signs within URLs should always be encoded.Heriberthttp://wettels.infonoreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-4557773836328599542009-09-13T16:41:03.195+02:002009-09-13T16:41:03.195+02:00@Aarron.
You are indeed right. I have not looked ...@Aarron.<br /><br />You are indeed right. I have not looked into this issue in detail, but generally I find the error messages in the HTML 5 validator easier to understand. There is still some work that needs to be done, though.Lars Gunther (itpastorn)https://www.blogger.com/profile/11544012919049072827noreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-41545638180876503412009-09-13T16:39:50.429+02:002009-09-13T16:39:50.429+02:00Quick answer to Lachlan:
"unencoded ampersan...Quick answer to Lachlan:<br /><br />"unencoded ampersands and less than signs"<br /><br />I was under the impression that they are caught with normal validation. I do agree that they are very common, though.<br /><br />As for your first comment, I have already answered Zcorpan on that one. Bear in mind that this post is intended as a discussion starter. I am sure things might change during our discussion, perhaps even my mind!Lars Gunther (itpastorn)https://www.blogger.com/profile/11544012919049072827noreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-65255906087975221692009-09-10T19:24:42.200+02:002009-09-10T19:24:42.200+02:00I don't think warning about attribute values c...I don't think warning about attribute values containing equals signs is a good idea. The href and src attributes commonly do when they have query strings in the URL, and flagging that would be misleading. Perhaps if the warning was restricted to being applied to a more limited set of attributes, it might work.<br /><br />Also, I'm surprised you didn't mention unencoded ampersands and less than signs, which, from my experience, is among the most frequent errors.Lachlan Hunthttp://lachy.id.au/noreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-55032746322721696172009-09-10T14:02:42.010+02:002009-09-10T14:02:42.010+02:00Beyond the polyglot validation issue, the W3C'...Beyond the polyglot validation issue, the W3C's validator needs to present errors in a more student friendly language. It's one thing for a student to identify a problem point in their code, it's another for them to understand the recommendation that is offered in what seems to them a foreign language.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-4634632204883372332009-09-10T11:30:19.333+02:002009-09-10T11:30:19.333+02:00@zcorpan:
1. Yeah! I knew that I got it wrong. It...@zcorpan:<br /><br />1. Yeah! I knew that I got it wrong. It is sort of forbidden if you want an identical DOM... I'll change it.<br /><br />2. Good catch! Yes, mismatched quotes usually cause validation errors today. I gave this a rather low grade because of that. There are still two aspects though: (a) when two errors even out. (Yes I've seen it.) (b) The possibility of giving the user a warning that is easier to understand. (Probably the better argument of the two.)<br /><br />You are indeed correct about the fact that equal signs are common in links. I should have said that one should exclude the href and the src attribute from that specific test.<br /><br />3. Do you mean that there is so much bogus lang that one should not teach students to use it at all?<br /><br />WCAG 1.0 specifies that you should use the lang-attribute, and WCAG 2 is interpreted to mean the same thing (3.1.1) http://www.w3.org/WAI/WCAG20/quickref/#qr-meaning-doc-lang-id<br /><br />Isn't it true that almost all bogus lang is "en", since students and lazy developers simply copy-paste code. Perhaps we could add an info notice to the validation report that explicitly interprets the attribute value into a full sentence - since we are talking about pedagogic validation!Lars Gunther (itpastorn)https://www.blogger.com/profile/11544012919049072827noreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-41266806365889710212009-09-10T07:25:20.947+02:002009-09-10T07:25:20.947+02:00> Did you know that a line feed immediately fol...> Did you know that a line feed immediately following the starting pre-tag is forbidden, when using XML parsing rules? I most certainly did not. (And I am still a bit unsure if I got it right...)<br /><br />It's not forbidden, it's just that it means different things in text/html and in XML. In text/html, the line feed is eaten by the parser. In XML, it is not. So if you want your markup to work in the same way in text/html and in XML, you can't use a line feed there.<br /><br />> Attribute values that contain > or = probably are errenous (grade 3)<br /><br />It is very common for URLs to contain =. I think mismatched quotes are caught in the validator already without banning > or = in quoted attributes.<br /><br />> Language must be specified (grade 5)<br /><br />Nooo! :-) This would result in even more bogus lang. (It is already used incorrectly so much that UAs are better off ignoring it and applying language analysis on the text.)zcorpanhttps://www.blogger.com/profile/02707063734332204359noreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-84151836479478026422009-09-10T02:48:25.831+02:002009-09-10T02:48:25.831+02:00I also enjoyed reading it, and I understand most o...I also enjoyed reading it, and I understand most of the concerns that are kind of typical when you are into showing people how uneasy and how dull learning HTML is *something right opposite to the common expectations*. Yet, my style has been obvious and I tried not to be "very forgiving" while teaching, like a bad HTML being somehow interpreted at most recent browsers. I can't expect new learners by-passing difficult situations with all-ease and no trouble at all.<br /><br />If they want to understand how HTML marks-up and how it works, one should show them to take the standard path before showing Alice's hole. Besides, I don't believe one could understand Document Object Model and today's most XML applications by doing otherwise.<br /><br />I think "no pain there is no gain" applies here.<br /><br />I agree with the comments of Tantek, although the validator does not mean to be the embodiment of web standards itself, aiming to catch flawless results always helped learners gaining a great deal of HTML awareness, hence making so must be a decent practice. Then of course, by some appendix or addendum, you can tell them about how stupid putting empty ALT attributes, or other tricks whatsoever. This will be creating your own (quality) difference :) best regardsKunter Ilalanhttp://kunterilalan.comnoreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-66823279035156910602009-09-10T01:23:51.937+02:002009-09-10T01:23:51.937+02:00Lars, this is a great post. My HTML / CSS / microf...Lars, this is a great post. My HTML / CSS / microformats teaching/workshops experiences echo yours. I've found that when students are instructed to write valid XHTML, they tend to make fewer errors (whether caught at validation time or browsing time) than if they write "just" HTML.Tantekhttp://tantek.com/noreply@blogger.comtag:blogger.com,1999:blog-17809600565735611.post-44616246886254619662009-09-10T01:15:23.130+02:002009-09-10T01:15:23.130+02:00A quick note to self:
"Attribute values that...A quick note to self:<br /><br />"Attribute values that contain > or = probably are errenous (grade 3)"<br /><br />Another benefit of having such a check is that even when two errors do not even each other out, making the error visible using today's rules, the actual error message and location will be much more intuitive with my extra rules.Lars Gunther (itpastorn)https://www.blogger.com/profile/11544012919049072827noreply@blogger.com