[html5] Updating to XHTML 1 to HTML5

Ian Hickson ian at hixie.ch
Thu Sep 2 12:17:02 PDT 2010


On Thu, 2 Sep 2010, Alastair Campbell wrote:
> 
> I've had to switch between HTML 4.01 and XHTML 1.0 a few times, and the 
> XHTML>HTML route is generally easier, a search and replace on:
>
> />
>
> for
>
> >
>
> will get you most of the way.

At this point the "/>" syntax in HTML is valid, so long as it's used only 
on elements where it wouldn't make any difference anyway (the "void 
elements" in the spec, such as <img>, <br>, etc). Any case where the above 
search and replace would work is a place where you don't have to change 
it for HTML any more. :-)

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'



More information about the Help mailing list