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

how tidy8jul00 treats STYLE blocks

From: Sebastian Lange <lange@cyperfection.de>
Date: Thu, 13 Jul 2000 14:00:45 +0200
Message-Id: <>
To: html-tidy@w3.org
When I use the --clean "yes" option, tidy turns presentional markup into 
appropriate style rules and places them into a <STYLE></STYLE> block in the 
document head.

However, if there is already one STYLE block in the original file, tidy 
does NOT add its generated style rules to that block, but adds its own 
block to the document head. Is this behaviour desired?

Moreover, if there are several STYLE blocks throughout the document, Tidy 
moves them all to the document head, but does not concatenate them into one 

Also, it does not insert comment tags into its generated block (to hide the 
style block content from older browsers).

In other words: A generated block should look like this:

><STYLE TYPE="text/css">
>     .c1 {text-align: center;}

rather than:

><STYLE TYPE="text/css">
>  div.c1 {text-align: center}

(I also think that it should be simply ".c1" instead of "div.c1", as this 
would make it easier for the beforementioned recursive directory tidying 
and extracting style blocks into an external CSS document.)

Comments? Questions?
Sebastian Lange
Maybe the first chat site that validates as HTML
4.0 even though user input may contain HTML codes.

Courtesy to Dave Raggett's HTML Tidy:
Received on Thursday, 13 July 2000 08:13:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:48 UTC