What happens if the meta tags are present in the document body?

后端 未结 9 1779
有刺的猬
有刺的猬 2020-11-29 06:26

I am working on a ASP application and the code, template and files are organized in a way that does not allow me to alter anything outside the body tag. So I am thinking abo

9条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-29 07:03

    I have put some meta tags into the body, but that is because of the Microdata technology. When I do not have a regular element with the info, that I need to describe the object according to the schema.org vocabulary , I set a meta tag with this content. I prefer to do it that way instead, to set an element with display:none. The way with display:none may cause more google problems instead of this, as far as I know. I agree it is not the best practice, but when I validate my document (HTML5) I pass the validation with zero errors. Also I have done this trick for a several projects and none of them has problems with google or other search engine. Even microdata improve the search engine ranking. I don't know what exactly you want to do with this meta tags into the body, because I have not saw any microdata in your code. If you need it for this approach I think it is ok, but in other cases meta elements must be in head section!

提交回复
热议问题