Google’s John Mueller stated that with regards to your HTML head part, you wish to guarantee it’s clear and tight. If potential, you don’t need it to have damaged syntax as a result of it will possibly break different components of the web page and make it arduous for Google to learn the web page and your customers.
And John stated preserve JavaScript out of your head part.
Sure, Google can deal with damaged HTML – I imply, a lot of the HTML on the net might be not even near 100% legitimate. So Google has to deal with it. However with regards to structured knowledge or different technical, not seen, components of your supply code – attempt to validate it.
The query was on Reddit and it requested “Does Googlebot crawl from the highest? Essential HTML Content material begins on line 5118 of Code – Is that this an Situation for search engine optimisation?”
John replied, saying the content material place within the HTML will not be actually the priority; it’s the stuff round it which may break it or would possibly make it arduous for Google to choose up on that content material. John wrote, “The html headers (head) ought to be just about on prime. I would transfer any JS to beneath the HTML headers, and test with the rendering device in search console that the JS does not mess up the pinnacle part. For the content material it does not matter as a lot, however because the head stuff is for machine-readable info that is verified to be in a particular a part of the web page, it actually must be clear on prime.”
“Down with JavaScript! (within the head),” John added.
John was later requested about Google Tag Supervisor’s location and he stated, “Each state of affairs is completely different. I would have a look at what you do with GTM, check it in a browser & with the testing instruments.”
Years in the past, John additionally stated content material place on a web page does not matter anymore. Though, not too lengthy earlier than that, Gary Illyes from Google stated not way back that content material order and place issues on cell for rankings. And do you bear in mind the times of SEOs obsessing about CSS positioning
Discussion board dialogue at Reddit.