Search code examples
htmlmeta-tagsdtd

DTD for a custom meta tag


I am creating a meta tag like

<META name="importantElement" elementID=... />

Is there a way in the .dtd to mark that <META name="importantElement" also requires the elementID attribute?


Solution

  • As per the very helpful comments posted on this question, the answer is that you can't enforce a dependency between attributes using a dtd, that HTML 5 does not use a .dtd, and HTML 5 support for custom tags is handled in a subset(?) of web browsers through Web Components, as per the post I found here