Can I put Doctype in the middle of the code?
Hi, this is my first time here, so thanks for any help / advice you can give!
I started working somewhere with a CMS, and therefore we work with templates. But these templates don't have Doctypes delcared at the top (and we're not allowed to change that :() and so it throws everything we design into Quirks mode when viewed in IE. This means the foreground coding is "very" with hard to handle. "
So my question is, can I somehow cheat and insert the Doctype halfway through the document? Could this help? How can I make my code look similar in every browser?
I know the best solution is to get the Doctype at the top of the document. But I have no control over it yet.
Any advice is appreciated! :)
source to share
The decoration <!DOCTYPE html>
must be at the top of any page and cannot be in a tag <html>
.
See article. http://www.w3.org/wiki/Doctypes_and_markup_styles . It must be declared somewhere, like in a header file or something like that.
Edit: Format + Added up to date related documentation.
source to share