Project

Profile

Help

Bug #4401

Updated by Michael Kay over 4 years ago

The W3C serialization specification says that with the HTML output method, the DOCTYPE declaration should appear "immediately before" the first start-element tag. That implies it should appear after any opening comments and processing instructions. I'm pretty sure we output it before any opening comments and PIs. 

 Need to check against the HTML spec to see what makes most sense. 

 Note also, we've had a couple of people trying to output PHP using the HTML output method, and stumbling over the fact that the HTML output method outputs PIs with a closing ">" rather than "?>". We've also had requests to suppress the DOCTYPE output for HTML-5.

Back