HTML validation · Document structure

Missing body element

The page has no body tags. Browsers add a body automatically, but tools that read the source may not find the main content.

How this page is built

The source of this page has no <body> or </body> tags. Browsers create a body element automatically when they reach the first piece of visible content.

Why it matters

HTML allows the body tags to be left out, and browsers add the element for you. The page in this test still works.

Some crawlers and tools read the source directly and look for a body element. Without one, they may miss the content, fail to count words, or report the page as broken. Missing body tags also make templates harder to maintain.

How to check it

View the source and search for the opening body tag. Crawl tools that check document structure will report a missing body. Browser developer tools show the body that the browser created.

How to fix it

Add explicit body tags to the layout, wrapping all visible content. It costs nothing and makes the structure clear to every tool that reads the page.

Back to all tests