HTML5 Validation Errors: body start tag seen but an element of the same type was already open AND Stray end tag head

Hello,

I hope it’s a right thread to ask this question.

I’m trying to undestrand and resolve two errors that https://validator.w3.org/ tells me: “Body start tag seen but an element of the same type was already open” and “Stray end tag head”. I checked the code various times and can’t find where I have the second tag. I read that those errors can occur when something inappropriate is placed inside but can’t figure out what exactly goes wrong. Is the with the rel=“stylesheets” a problem? I can’t remove that to check because it’s a code that add translation tool to the website.

The website: https://www.rinnovision.com/ (The code is too big to paste it here) Thank you!

Read-only link

Nobody knows… that’s sad

Helps if you share the actual link, screenshots, etc :laughing:
Makes it easier for the community to help you.

Are you talking about these?

image

Readonly links do not show your site code but my guess is you’ve pasted your GTM code in the wrong place. Likely needs to be in /body.

Then it looks like you have the opposite problem too- <link> elements in the body.

Those errors break the document structure and HTML parsers will try to fix it- which is then where you may be getting the duplicate head and body tag errors.

1 Like

You are right, it didn’t come to my mind to share screenshoots :woman_facepalming: Thank you!

I mean these errors:

Now I’m trying to understand your answer and if it can help me with initial request. Thank you!

Exploring your answer I understood my problem and managed to resolve it. The problem was that the GTM was placed at wrong place, as you said. It wasn’t me who imnplemented it so I even didn’t think it could be a problem.

In case someone will have the same issue, the correct way of implementing that is on the image


I had all the code in </head/>.

@memetican Can’t thank you enough!!!

1 Like