Re: HTML or XHTML - why do you use it?

On Wed, 8 Jan 2003, Toby A Inkster wrote:
>
> On Wed, Jan 08, 2003 at 12:57:57AM +0000, Ian Hickson wrote:
> | The problem is that the following string:
> | 
> |    <script> <!--
> |      work();
> |    // --> </script>
> | 
> | ...will be treated differently depending on whether it is supposed to be
> | HTML or whether it is supposed to be XHTML.
> 
> True -- so use this instead:
> 
>    <script>
>      work();
>    </script>
> 
> Perfectly valid in both HTML 3.2, HTML 4.0, HTML 4.01, XHTML 1.0, HTML 1.1 
> and the latest XHTML 2.0 draft.

That's what I said. "never use <!-- --> in <script> or <style>".

But it's one of the many things people get wrong, and one of the many
things that will screw up when people change their text/html XHTML files
to use a real XML MIME type.

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 8 January 2003 04:42:35 UTC