HTML BODY Tag

How to use the body tags of HTML, and a list of allowed attributes.

The HTML body element is used to markup the content of HTML pages, and begins the first section on a page.

The body element is a sectioning root, meaning that if no other sectioning element is present, any sections included on the page, will count as subsections of body.

The body is also the second element in HTML, and child of html

Attributes

Attribute: Value: Description:
Attributes Global Attributes Global, Event, I18n

Using the body element

The body section begins below the head section, pages should always have a body section.

The below example shows where the body section is placed.

<!DOCTYPE html>
<html lang="en">

  <head>
    <title>Body Example</title>
  </head>

  <body>
    <h1>Body Example</h1>
    <p>This is the first section on the page.</p>
  </body>

</html>

Brugbart Vision!

Post comment

Links that you insert are not nofollowed, but will be removed by admins if they are considered spam.

[url=Absolute URL for page]TITLE[/url]

You should insert code boxes around code examples, which will be automatically syntax highlighted.

[code1 html|css|javascript|php|sql]Your Code Here[/code1]

You may want to read our Privacy Policy before submitting your comment.