W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2009

Re: how can I disable <style> element's movement?

From: Rijk van Geijtenbeek <rijk@opera.com>
Date: Fri, 18 Sep 2009 09:50:05 +0200
To: "html tidy" <html-tidy@w3.org>
Message-ID: <op.u0fz1rxlicz8n2@acer-laptop.lan>
Op Fri, 18 Sep 2009 06:48:57 +0200 schreef 石瑞 <shirui@comsenz.com>:

> input:
><div>
>> <style>
>> xxx
>> </style>
> </div>
>tidy output:
><html>
>> <head>
>>> <style>
>>> xxx
>>> </style>
>> </head>
>> <body>
>> <div></div>
>> </body>
> </html>
>but I want this:
><html>
>> <head>
>> </head>
>> <body>
>> <div>
>>> <style>
>>>> xxx
>>> </style>
>> </div>
>> </body>
> </html>
>How can I disable the style element's movement? Thanks a lot!
>

That's not possible I think. Note that in HTML, the style element is  
supposed to be in the head, it is not allowed in the body. So tidy does  
what its name implies: tidies up the wrong placement of the style element.

-- 
  Rijk van Geijtenbeek
  Opera Software ASA
http://my.opera.com/Rijk/blog/

"The most common way to get usability wrong is to listen to what users
say rather than actually watching what they do." - J.Nielsen
Received on Friday, 18 September 2009 07:51:02 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:59 GMT