I have read that it is bad to do this, and outside the spec, but I have an error that is somewhat intermittent, and may be related. Just want to know if the general consensus i
Content appearing between the end tag and
start tag gets inserted just past the
start tag, unless it's an element that does not belong in the body, in which case it will be inserted at the end of the head.
Certain elements, like script
, may appear in either the head or the body; script elements in that location will be inserted at the end of the head, unless the browser is already in the "in body" insertion mode, in which case they'll be placed in the body.
See sections 8.2.5.4.4 The "in head" insertion mode, 8.2.5.4.6 The "after head" insertion mode and 8.2.5.4.7 The "in body" insertion mode of W3C HTML for further details. Note that implementations are not guaranteed to follow the spec, either owing to historical reasons, bugs, or deliberate decision to violate the spec, and this behavior should not be relied on.