I'm building a javascript image gallery. Which uses my user defined tag "gallery".
And now I want to add this to a DTD document, so that it can be properly validated.
Rather than question your methods (I like to experiment with weird stuff, too, to help me learn how things actually work), how about surrounding it in a div first?
Interestingly enough I can't seem to ever put anything as a direct, first descendant of the body element without first wrapping it in a div without getting a validation error. I'm no W3C guru so I don't know why this is, but I'll bet that if you put a div around it first then it might fix the problem.
I've switched careers...
I'm NO LONGER a scientist,
but now a web developer...
awesome.
Interestingly enough I can't seem to ever put anything as a direct, first descendant of the body element without first wrapping it in a div without getting a validation error.
Any block level element will validate, whereas an inline element must be enclosed in a block level element.
Thanks aj_nsc, for being supportive of my experimentations. I tried your suggestion, and it seem as though it's not working like that either... :/
Fang.. Why be so negative towards experimenting? The only way of evoluting knowledge is through experimentation. I don't really get W3C there either.. Cause, using custom DTD's with valid syntax, should be just as normal as customizing files in any Open-Source project.
So I don't really get the "big bad" harm in making custom DTD's for custom projects.. But I can see that it would be better to just use the good old div-tag with the className "gallery" instead.
Bookmarks