Skip to content Skip to sidebar Skip to footer

Why Is It Possible To Add Text Inside The Head Section

Why does the text inside a head section of a HTML page get rendered in the DOM? According to MDN the head section should do the following: The HTML element provides general inf

Solution 1:

Text is not valid in the head tag.

The error correction of the browser moves the text from the head to the body

4.2.1 The head element

Content model:
If the document is an iframe srcdoc document or if title information is available from a higher-level protocol: Zero or more elements of metadata content, of which no more than one is a title element and no more than one is a base element.
Otherwise: One or more elements of metadata content, of which exactly one is a title element and no more than one is a base element.


Post a Comment for "Why Is It Possible To Add Text Inside The Head Section"