Is it valid to have blank line returns preceding the doctype declaration?
The
<!DOCTYPE>declaration must be the very first thing in your HTML document, before the<html>tag.
via w3schools
Not necessarily; BOM, whitespace and comments may come first.
http://www.w3.org/TR/html-markup/documents.html#syntax-document-html
So yeah, it must come first, before any actual HTML tags, but note that you can't really ever put doctype before BOM.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With