html
  1. html-body-tag

HTML <body> Tag

  • The <body> tag in HTML is used to define the main content of an HTML document.
  • Everything that appears on a web page, including text, images, links, and other elements, is typically enclosed within the tags.

<!DOCTYPE html>
<html>

<head>
    <title>additionalsheet</title>
</head>

<body>
    <h1>Welcome to the additionalsheet</h1>
    <p>Welcome to Additional Sheet, where learning is made easy and accessible for everyone.</p>
    <!-- Other content goes here -->
</body>

</html>
Try Playground

Body Tag Attributes

Attributes can be added to the `<body>` tag to modify its behavior or appearance. Some common attributes used within the `<body>` tag include:

  1. bgcolor

    Sets the background color for the entire web page.

    <body bgcolor="yellow">
    
  2. text

    Defines the default text color within the body.

    <body text="black">
    
  3. link

    Specifies the color for unvisited links on the page.

    <body link="blue">
    
  4. vlink

    Sets the color for visited links.

    <body vlink="purple">
    
  5. alink

    Defines the color for active links.

    <body alink="red">
    
Summary

These attributes have been traditionally used, but their usage has become less common with the advent of CSS (Cascading Style Sheets), which provides more advanced and flexible styling options for web pages.

Published on: