hi, Sybren, thanks for your reply, if use CSS:
<span class=type1>text<span class=type2>text</span></span><span class=type1>text</span> optimise to: <span class=type1>text<span class=type2>text</span>text</span> what i need is the METHOD to do optimization, in fact, i have ready write a program to analyse the syntax of CSS, to make it works with all situation -- http://mail.python.org/mailman/listinfo/python-list