Help save net neutrality! Learn more.

#326 Ultra-clean mode


Below are all of the elements and attributes which, while not deprecated, which I believe it makes a lot of sense to have an extra clean option (maybe "extra clean" or "ultra clean" which allows conversion of these, since they are not quite "semantic" and their exclusion may also facilitate transition to future versions of XHTML via XSLT.

All of the following elements allow “common” attributes (and only those attributes), so their attributes would map over fine into their corresponding <span> (or <div> for <hr>) which also allow “common” attributes.
b (font-weight:bold;)
big (font-size: larger)
i (font-style: italic)
small (font-size: smaller)
sub (vertical-align: sub)
sup (vertical-align: super)
tt (font-family: monospace)
hr (border)

The following attributes, similarly, are not deprecated (well, align is supposed to be deprecated in HTML, but it is listed as part of the XHTML modules and for table subelements it is even listed in HTML Strict and 1.1), but are still presentational:

1) table:
I was able to get Firefox to work with this equivalent but not Explorer:
table.c0 {border: 1px outset #000000;}
td.c1 {border: 1px inset #000000;}
cellspacing: td {border-spacing: }
cellpadding: td {padding: }
void: border-style: none;
above: border-top-style:
below: border-bottom-style:
hsides: divided in half between: border-top-style: ; border-bottom-style:
vsides: divided in half between: border-left-style: ; border-left-style:
lhs: border-left-style:
rhs: border-right-style:
box: border-style:
border: border-style:
width (width:)
2) for tr, td, th, tbody, thead, tfoot, col, colgroup elements:
valign (vertical-align: top/middle/bottom/baseline)
align (text-align: left/center/right/justify (in CSS 2.0, if “char”, just becomes the quoted character (e.g., align=”char” char=”.” becomes text-align: “.” (there was no equivalent for “charoff”, even in CSS 2.0, however), but in CSS 2.1, this feature was removed entirely: )
3) col and colgroup elements also have a width attribute which becomes simply: width:
4) object: height (height:), width (width:)
5) img: height (height:), width (width:)

(Incidentally, I found in researching the above that frameset and textarea's rows and cols attributes and input and select's size attribute ought to be stylable too, but there are no CSS equivalents...)


  • Arnaud Desitter

    Arnaud Desitter - 2007-07-30
    • priority: 5 --> 6
  • brettz9

    brettz9 - 2007-07-30
    • priority: 6 --> 5
  • brettz9

    brettz9 - 2007-07-30

    Logged In: YES
    Originator: YES

    I wonder if this proposed ultra-clean mode ought to remove "lang" as well for the sake of being compatible into the future.

    Note also that if the XHTML 1.1+ module feature is implemented in Tidy (another bug report just filed), the existing non-deprecated modules (i.e., not only the deprecated applet, name identification and legacy modules) still allow some of the above attributes, so it would not be sufficient to use non-deprecated XHTML 1.1 modules for this ultra-clean mode.

  • brettz9

    brettz9 - 2007-08-01

    Logged In: YES
    Originator: YES

    One element I missed: <pre>: (<div> with the following CSS: white-space: pre;)

  • brettz9

    brettz9 - 2007-08-01

    Logged In: YES
    Originator: YES

    One element I missed: <pre>: (<div> with the following CSS: white-space: pre;)

  • David Latapie

    David Latapie - 2007-08-03

    Logged In: YES
    Originator: NO

    I replied in the list, but for reference, I write it here too,

    == Proposal for removal==
    === “small (font-size: smaller)” ===

    We'got this conversation in X/HTML5. Conclusion: small is useful (and kept in X/HTML5, at leat last time I check). Reason: it denotes 'less importance, like when you lower the voice.

    Personal additon (not X/HTML5):
    It is better to use it only in block mode, as <p><small></small></p>, since parenthesis achive a much better effet inside a paragraph.

    Fon instance, <small> would be used for legalese, of course but also post-scriptum, humourous last word remarks and son, but always as whole paragraph (it should still be an inline tag).

    ===“sub (vertical-align: sub)/sup (vertical-align: super)”===

    Is there any semantic is exponent (square, cube...)? If yes, then sup and sub shall be kept. for footnotes calls, I tend to take the <aside> route (once again X/HTML5), so the question is over. but for mathematical exponents, it remains.

    Do you see any other use of <sup> and <sub> that could qualify for semantics?

    “tt (font-family: monospace)”
    I use it as <NOTE> (HTML3 — not HTML 3.2). It appears to me it fills a void. Much like <hr> becoming <separator>, it shall be renamed,, though.

    == <pre> ==
    By the way, I don't know if it is still a proposal, but I am firmly against <precode>

    As for <pre>:
    1. if it is kept, default rendering shall be _whitespace:pre-wrap_ and not -_whitespace:pre_-
    2. it may be better kept, since there is semantics in <pre>.
    2.1. in some langagages, whitespaces are meaningful. Theyr are useful in all of them.
    2.2. what about text browsing (Links, Lynx, w3m… -- I do not mention search engines here)?
    2.3. what about copying a (paper) letter? Shall this be rendered with:
    2.3.1. <p></p> (ugly)
    2.3.1. <br /> (not so great)
    2.3.3.<l> (still in the specs?)
    2.3.4. <pre>
    2.3.5. something else?

    Thank you for you reading.

  • Geoff

    Geoff - 2016-04-03

    Thanks for the feature request... now so long ago... sorry for the delay...

    Tidy source has moved on to, site to

    Hmmm, an --ultra-clean yes option... I have tried to carefully read through your proposal, but still wonder why this should not be handled by -c? If your extra clean is worthy of consideration, then why is it not in clean? But maybe I missed something...

    However, if you want to persue this, or find another tidy bug, or feature request, then please file an issue, together with tidy version, sample html input, config used, current output, and expected output, to make it easy to test the problem.

    And if you find, fix, and test the fix, or feature in a tidy fork then you can issue a Pull Request. Always appreciated... thanks...

    Tidy needs your support...

    Meantime closing this here as out-of-date...

  • Geoff

    Geoff - 2016-04-03
    • status: open --> closed-out-of-date
    • Group: --> Current - all platforms

Log in to post a comment.