Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is XHTML really Xtensible?

Tags:

html

xhtml

Is there any way (server- or client-side) that I can actually extend HTML to include new tags? For example, it would be cool if I could write something like a schema fragment that defined a blogpost, which contains a postname, a postauthor, a posttime, and a postcontent, and thereafter refer to blogpost in my HTML rather than resorting to the basic HTML div and p tags.

like image 405
JnBrymn Avatar asked May 02 '26 15:05

JnBrymn


2 Answers

Sounds like HTML5 is right up your alley!

You can use elements like section to wrap up all your posts, and article for each post, plus basics like header, nav, and footer. There isn't fine grained elements like postauthor or posttime but you can provide other attributes to help define these.

Hmm, seems I spoke to soon, you can use this too:

<time pubdate datetime="2010-11-13T20:00+09:00">Posted Nov 13.</time>
like image 200
scunliffe Avatar answered May 05 '26 05:05

scunliffe


That would be awesome. Here is an article explaining why it won't work. Basically, you can extend the markup. But HTML browsers won't know how to interpret your new tags.

like image 41
Stephen Avatar answered May 05 '26 05:05

Stephen