On Tue, Aug 16, 2011 at 7:56 PM, Brion Vibber brion@pobox.com wrote:
I'm not entirely convinced it's necessary at this stage though; HTML 5 draft spec has some wishy-washy language about "obsolete non-conforming features" that authors "must not use"[1], but I'd be a bit surprised if browsers are actually dropping support for <font> or @valign.
The language isn't wishy-washy -- it's an authoring conformance requirement. The full explanation is here:
http://www.whatwg.org/specs/web-apps/current-work/multipage/infrastructure.h...
The upshot is that HTML5 specifies what validators have to say is valid or invalid, and also how browsers have to process content, but the two are in general totally unrelated. Thus <font> is considered an error, but error handling is fully defined, so in practice it will work fine anyway except that the page won't validate.
If it's just about feeling good when you run through a validator tool, a smarter validator tool that looks for things that are *actually* problems might be better to use. :)
I've tried to argue that, but the editor disagrees and I eventually gave up. It might help if major software projects like MediaWiki officially said that they're not interested in validating as HTML5 because of this.
Would anybody care to do some tests to confirm what the actual state of things is?
Probably easier to just ask me. :) Web standards are my job these days.
That said they're mostly trivial mechanical transformations, which both shows it'd be easy to do and proves how unnecessary it is to actually do the conversions.
. . . mostly. There are actually a significant number of cases that aren't. Most of the table attributes (cellspacing cellpadding etc.) are very nontrivial. There's no precise CSS equivalent for <font size=7>. Parsing of <font color> is outright pathological, and doesn't map to CSS' color property at all:
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsynt...
The align attribute and <center> have very particular effects that don't map to anything in CSS -- look at something like <div align=right><div style="width: 3em; border: 1px solid black">foo</div></div>, and try to change attributes on the outer <div> so it actually looks the same using pure CSS.
Etc. Some of these differences are not so important, but actually some of them are and will definitely break pages if you try rewriting stuff. A lot of this stuff uses pre-CSS parsing/rendering models that don't map cleanly to anything in CSS.