HTML HTML Tutorial HTML Forms HTML Graphics HTML Media HTML APIs HTML Tags



HTML Tag: body

The HTML Tag: body is one of the most important tags in HTML. It is used to define the main content of a web page. The body tag contains all the visible content of a web page, including text, images, videos, and other multimedia elements. The body tag is also used to define the background color, text color, and other visual properties of a web page. The HTML Tag: body is a container tag that is used to define the main content of a web page. It is placed between the opening and closing HTML tags. The body tag contains all the visible content of a web page, including text, images, videos, and other multimedia elements. The body tag is also used to define the background color, text color, and other visual properties of a web page. The body tag can also contain other HTML tags, such as headings, paragraphs, lists, tables, and forms. These tags are used to structure the content of a web page and make it more readable and accessible to users.

Example 1: Basic Body Tag

The following code example shows a basic HTML document with a body tag:

``` My Web Page

This is the main content of my web page.

```

Example 2: Body Tag with Background Color

The following code example shows a body tag with a background color:

``` My Web Page

This is the main content of my web page.

```

Example 3: Body Tag with Text Color

The following code example shows a body tag with a text color:

``` My Web Page

This is the main content of my web page.

```

Example 4: Body Tag with Heading and Paragraph Tags

The following code example shows a body tag with heading and paragraph tags:

``` My Web Page

This is the main content of my web page.

Section 1

This is the content of section 1.

Section 2

This is the content of section 2.

```

Example 5: Body Tag with List Tag

The following code example shows a body tag with a list tag:

``` My Web Page
  • Item 1
  • Item 2
  • Item 3
```

Activity