Re: Custom elements in XHTML

On Fri, Jul 11, 2003 at 10:44:47AM +0100, Barry Broom wrote:
| When using XHTML and CSS, I find myself creating a lot of classes in DIV
| and SPAN elements, such as;
| <span class="xhtmlCode">.</span>

I would suggest the following is more appropriate:

	<code class="xhtml">...</code>
| Now with XHTML being _extensible_ I would have thought I could make my
| own element such as;
| <xhtmlcode>.</xhtmlcode>
| Then style it with CSS. This would be much easier to read, but in my
| research, it doesn't seem possible.

It is possible, but the result would not be valid XHTML (it would 
however be well-formed XML, and should thus be interpreted sensibly by 
most existing XML user agents).

What XHTML does is make it easy(-ish) to define your own custom XML 
document languages, for example, you could create BarryML -- which would 
be the same as XHTML but with an <xhtmlcode> element.

Documents in BarryML would not be valid XHTML, but would be valid 
BarryML and valid XML and should be understood by any XML browsers.

Toby A Inkster BSc (Hons) ARCS | | pgp:0x6A2A7D39
    aim:inka80 | icq:6622880 | yahoo:tobyink |
   | "You've got spam!"

Received on Sunday, 13 July 2003 13:46:55 UTC