I'd like to make my own "XHTML tags library".
Why? Is this a server-side or client-side operation?
I'd advise against it for a client-side purpose (i.e. these tags get
sent to the browser). In general a "browser" won't know what to do with
them, so you gain nothing. It also stops your page being "standard HTML
valid". Although you could do this legally and validly for XHTML as
XML, that's not a practical proposition for the web.
You also don't _need_ to do this, as intelligent use of class will
allow all the subclassing of tags that you might need. Anything such as
a property extension to tag function needs new attributes to be added
to them, and here you're certainly off the edge of SGML-legacy browser
support. You _can_ do this (and it has uses for DHTML) but the rules
now are the same as they were in 1997 ("browsers safely ignore weird
attributes, but you're on your own for what you do with them")
If you're thinking server-side (i.e. these tags produce nothing more
over the HTTP link than standard, valid HTML) then look at JSP and tag
libraries. These are more than you're currently thinking of, but then
any "need" for a custom tag library is probably based on a dynamic site
with extensive content generation by code on the server.