On Thu, Dec 25, 2008 at 13:01, Keryx Web <webmas...@keryx.se> wrote: > Hannes Magnusson skrev: >> >> I don't think nesting <p> tags are a problem in html5. >> AFAICT it requires serious willpower to create invalid html5 markup. > > HTML introduces a new concept: "conformant". It distinguishes between what > browsers should be able to handle (including bad markup) and what authors > are required to do (write good markup). > > Todays browsers already handle badly written HTML. The new stuff is > basically just an effort to make them handle it in a consistent manner, not > only as to what graphical result they display, but to what DOM they will > produce internally. > > I.e. it is very easy to create non conforming HTML 5. > > <p>foo <div>bar</div> zoo</p> > > Not conformant. The div will close the paragraph. The intended remainder of > the paragraph ( zoo) will not be part of it. Neither styles or > DOM-manipulation will apply to it. The text will be a sibling node to the > paragraph. The end tag will simply be discarded. > > This is non-conforming markup. An HTML 5 validor, such as the one being > written by Henri Sivonen (http://validator.nu) will complain. In fact, HTML > 5 does __not__ lessen the rules on validation. Au cointraire: The rules as > tightened up. The following is illegal:
Right. As I see HTML5 it is simply a "how to deal with errors" appendix for browser vendors. There is no such concept as "valid web page" implemented on the web today. validator.w3.org doesn't send out correct headers and neither search.yahoo.com or google.com validate. The web is a tagsoup. We try to use as semantically correct markup as we can, but there is no way in h3ll everyone can write strictly valid pages. We shouldn't need doctors degree in markup to write web pages. What PhD does is to convert extremely semantically correct XML to (x)html(-ish) markup, injecting eRDF (and some microformats) semantics where it can to further improve the semantics. There is no way we can possibly make all pages "valid". As long as the browsers understand the markup and present it relatively alike then I am satisfied. I really do not see the point in wasting hours (and performance) in working around block elements inside inline elements, or nested paragraph tags. Browsers have implement this since the beginning. With HTML5 the "invalid markup" will become consistently rendered in the browsers and that is all we need; consistent rendering. I'm not saying that I'd veto patches to fix PhD rendering, but at the cost of massive performance degradation or hours of work... really? Should we really bother? Lets rather spend some time on researching the various RDF vocabularies that we can implement using RDFa or eRDF, or even microformats, we would gain so much more on that. -Hannes