Re: Missing HTML5 Doctype Error

Anonymous
Not applicable

Hi,

I'm creating landing page templates and I keep getting this error. Does anyone know what this means?

  • Missing HTML5 Doctype
5 REPLIES 5
Will_Etling
Level 2

I was getting this error. Turns out I had a blank line as line 1 of the template. <!DOCTYPE html> *has* to be on line 1. Thought this may help others.

Dave_Roberts
Level 10

I've seen this too Will, even when the doctype is declared on line two, if line one is blank it'll error out.

For what it's worth, I've seen this (and lots of other) little errors come as a result of copy/pasting for your favorite text-editing program (working offline) and have been able to reduce a bunch of these kinds of errors in my workflow by starting to work within the Marketo editor rather than the back-and-forth copy/paste process.

SanfordWhiteman
Level 10 - Community Moderator

FWIW... it's not an error standards-wise. HTML5 explicitly allows whitespace or even whole comments before the doctype, but Marketo doesn't.

Justin_Cooperm2
Level 10

If you click "Create New Landing Page Template" it will automatically have the right DOCTYPE inserted for you...were you copy and pasting?

Justin

Kenny_Elkington
Marketo Employee

Hi Amanda,

You probably need to add this to the top of your template:

<!DOCTYPE html>

This line let's the browser know what HTML version is in use in the document.