<html xmlns="http://www.w3.org/1999/xhtml"> <head> <style> <![CDATA[ div { background: red; height: 3em; } div:empty { background: lime; } ]]> </style> </head> <body> <div><![CDATA[]]></div> </body> </html>