Reputation: 2230
I like to head all my files with a comment about the file, but I've heard it's bad practice to put anything before the declaration. Is it okay to put comments before this or should I leave the top of my html files for the DOCTYPE?
Upvotes: 1
Views: 645
Reputation: 943615
Putting a comment before the Doctype will trigger quirks mode in some browsers. Since the entire purpose of the Doctype (as of HTML 5) is to avoid quirks mode, yes, this is bad practise.
Upvotes: 1