Search code examples
htmlvalidationw3c

W3C HTML5 validator error: An body start tag seen but an element of the same type was already open


I post this question because I'm having some errors with the w3c validator in my page (Link to validation).

It outputs me a lot of strange errors related with my HTML 5 markup, being this the main error I can't get out of my head:

Line 15, Column 6: An body start tag seen but an element of the same type was already open

I have looked a lot into this problem and I'm not able to find any solutions.

Although there are more strange errors, such as

Line 14, Column 7: Stray end tag head

I'm specially interested in the first exposed one, which I would like you to help me solving this.

Thanks in advance!

Problem solved:
Conclusions:

  1. Never display data into the <head> tag, otherwise, a body tag will be automatically opened.
  2. The <noscript> tag content is considered by the validator as displayable, so It's convenient to take care of what we write into the tag.

Solution

  • The noscript element in the head element contains text output. This is not allowed in the head element; noscript in the head element may contain only link, style, and meta elements (see the spec). Any displayable content implicitly closes the head element and opens the body element (because of their content models and the fact that both opening and closing tags for them are optional).