I’d like to add custom attributes to the <div> tags in my HTML. Is there a way to append those variables to the Doctype description, or should I not even worry about it. I found a similar question on StackOverflow, but it addressed XHTML.
I’d like to add custom attributes to the <div> tags in my HTML. Is
Share
You can create your own DTD, but not sure how some browsers might react to it, so you will have to test.
http://www.cs.tut.fi/~jkorpela/html/own-dtd.html
edit: overall it depends on what you are doing. It’s best if you can avoid a modified dtd.
.. I had to find it, but once I did something like this to get past validation (using propietary code, and couldn’t change much at the time, but wanted to get it as close to valid as possible)
if there was something in the code like:
And I wasn’t allowed to change it.
The problem is that you can’t leave it in the page, because it will probably print out the “]>”, but it works for defining an extra attribute for a validator.