Languages

Don't use “custom DTDs”!

Don't do this!

Technically, adding non-standard elements is done by writing a “custom DTD” and including it in the first line of the document (the DOCTYPE line). A custom DTD can be made, for example, by copying the HTML4 DTD and modifying it.

Don't do this! Documents need to have a meaning as well as correct syntax. SGML and XML only define syntax. HTML and XHTML define meaning. If you add elements that aren't defined by a standard, only you yourself know what they mean. And in 20 or 50 years, even you may not know it anymore…

Of course, you can experiment, for example to work on future Web formats, but other than that you should not use proprietary elements.

Bert Bos, style activity lead
Copyright © 1994–2022 W3C® Privacy policy

Made with CSS! Valid CSS! Last updated Fri 01 Apr 2022 01:43:31 PM UTC

Languages

About the translations