<body> Tag Syntax

<html xmlns="http://www.w3.org/1999/xhtml">
      <title>My Title</title>
      ... metadata content ...
      ... flow content ...
Rules for coding the HTML body element

Make sure you understand the difference between a tag and element and are familiar with the definitions of namespace and other HTML terms.

  1. Code the body element for the body section after the end of the head element inside the html element.
  2. Begin the body element with a starting <body> tag. The element name uses lower case letters and should be in the HTML namespace, which it will pick up automatically from the xmlns attribute on the <html> tag.
  3. Code the content of the document inside the body element.
  4. End the body element with a matching </body> closing tag.
Content of the body element

The content of the body element can include HTML comments, text content and any tags that can be used in flow content.