croatiankid Posted November 3, 2006 Share Posted November 3, 2006 Hi, I suggest you update http://www.w3schools.com/tags/tag_doctype.asp. The reason? The DTD isn't a tag, neither in HTML or XHTML. The W3C always calls it a doctype declaration/DTD, never a tag. I think it should stay in the taglist, but that it should be written on the page "The DTD is not a tag!", and the parts calling it a "tag" be reworded to call it a DTD or doctype declaration/definition, as said here and here. Link to comment Share on other sites More sharing options...
shiftJIS Posted November 4, 2006 Share Posted November 4, 2006 Actually, if you look at where they actually define the word tag: http://www.w3.org/TR/xhtml-modularization/terms.html#a_termsyou will see that <!DOCTYPE> is a tag. descriptive markup delimiting the start and end (including its generic identifier and any attributes) of an element.I think you're confusing a few things. The literal "<!DOCTYPE>" is a tag, the DTD is the document that the <!DOCTYPE> tag REFERS to. Much like, for example, CSS isn't a tag, but what we use to refer to it (<style>) is.Just for your information, here's an example of an actual DTD: http://www.w3.org/TR/html4/strict.dtd Link to comment Share on other sites More sharing options...
croatiankid Posted November 4, 2006 Author Share Posted November 4, 2006 The DOCTYPE can't be a tag. XML wouldn't permit it to be left open in an XHTML document, or any XML document for that matter. Link to comment Share on other sites More sharing options...
shiftJIS Posted November 4, 2006 Share Posted November 4, 2006 Read up on what it means to be well formed: http://www.w3.org/TR/REC-xml/#sec-well-formedThe closing tag is require for all elements within the document element. The DOCTYPE declaration is outside of that.Regardless, as it is still "descriptive markup" (meaning the user-agent knows how to parse it for information based on the way it's declared), I see no problem referring to it as a tag.You should also note that "<p>Content</p>" in its entirety is NOT a tag. "<p>" is a tag (called the opening/start tag), and "</p>" is another tag (called the end tag). Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now