Is XHTML really Xtensible?

Is there any way (server or client) that I can actually extend the HTML to add new tags? For example, it would be great if I could write something like a fragment of a circuit that defines blogpostwhich contains postname, a postauthor, a posttimeand a postcontent, and then refers to blogpostin my HTML, instead of resorting to the basic HTML divand tags p.

+3
source share
6 answers

HTML5 seems to be right up your mall!

You can use elements such as sectionto wrap all your messages, and articlefor each message, plus the basics, such as header, navand footer. There are no fine-grained elements like postauthor or posttime, but you can provide other attributes to help define them.

Hmm, it looks like I was saying soon, you can also use this:

<time pubdate datetime="2010-11-13T20:00+09:00">Posted Nov 13.</time>
+2
source

What will be will be amazing. Here is an article explaining why this will not work. Basically, you can expand the markup. But HTML browsers will not know how to interpret your new tags.

+2
source

-, . DTD, , , .

, , IE, , , JavaScript, . ...

0

, XML, , .

HTML5, <section> , , , , . hAtom.

, , , hAtom, , , .hentry, .entry-title .author.

0

DOM. XHTML, , .

, : WebODF, ODF . , , .

0

, XHTML . XHTML, , XHTML, XHTML.

XHTML XML- mime, application/xhtml + xml, IE IE9.

Here you can see an example using blogpost, postname, postauthor, etc.

http://www.alohci.net/application/xhtml+xml/custom1.xhtml.ashx

(works in Firefox, Chrome, Safari, Opera and IE9)


[Of course, you can simply put invalid tags in HTML and style them, but for me this doesn't seem like a question that was specifically related to the nature of XHTML.]

0
source

Source: https://habr.com/ru/post/1777557/


All Articles