Immediately following the opening < is a !, followed by the word doctype, without any spaces in between.While at least one space is required between t…