defining new tags with CSS?

I just noticed that this works, but I've never seen anyone actually do this before, so I'm wondering whether it's legal, or just accidentally allowed by Mozilla? It seems that instead of using <SPAN STYLE=...>, which is a lot of typing (adding at least 11 characters to each tag), it's actually possible to define new tag names, in addition to changing the semantics of existing ones:

    <STYLE TYPE="text/css">
      .foo { color: white; background: red; }
      bar  { color: white; background: green; }

    - plain
    - <SPAN CLASS="foo">foo</SPAN>
    - <BAR>bar</BAR>

I wonder if LJ is going to strip out the embedded <STYLE> tag and make all the following text show up the same:

    - plain - foo - bar

What a surprise, of course it does. Sigh.

No doubt this would confuse most validators too.

Tags: , ,