Search code examples
htmlfacebookmeta-tagsmeta

Facebook Debugger Error: Meta Tags In Body


When I check my website in the Facebook Debugger, I get this error:

Errors That Must Be Fixed

Meta Tags In Body Your page has meta tags in the body instead of the head. >This may be because your HTML was malformed and they fell lower in the parse >tree. Please fix this in order for the tags to be usable.

I believe this error also causes all other tags to become invalid.

I have been trying for many hours to locate the meta tags in the body, and have looked at the source, but I'm having trouble finding any in the body. I have tested it with Google's Structured Data Testing Tool, but it doesn't show any errors. It shows 3 identical versions of the same organization made through json, itemprop, and property (is that bad?).

I have looked at other stackoverflow questions about it, and they seem to get the help by letting others look at their homepage sources.

I know that my meta tags aren't very tidy or optimized, but right now I really need to fix this error. I appreciate any keen observations that can solve it!

Post comments:

Great tool for identifying and fixing HTML errors: http://validator.w3.org/ Another HTML improving tool with live response: http://www.dirtymarkup.com/


Solution

  • <!DOCTYPE html> must be put before <html>, line 68 usless comments, line 103 is wrong too.

    EDIT

    To beautify your code you can use http://www.dirtymarkup.com/