Skip to content
Related Articles
Open in App
Not now

Related Articles

HTML | body text Attribute

Improve Article
Save Article
  • Last Updated : 25 Mar, 2022
Improve Article
Save Article

The HTML <body> text Attribute is used to define a color for the text in the Document. 
Note: The <body> text attribute is not supported by HTML5.  Instead of using this attribute, we can use css color property. 


<body text="color_name | hex_number | rgb_number">

Attribute Values 

  • color_name: It specify the name of the color for the text in the Document.
  • hex_number: It specify the hex code of the color of the Text in the Document.
  • rgb_number: It specify the rgb value of the Text in the Document



<!DOCTYPE html>
    <title>HTML body Text Attribute</title>
<!-- body tag starts here -->
<body text="green">
        <h2>HTML <body> Text Attribute</h2>
<p>It is a Computer Science portal For Geeks</p>
<!-- body tag ends here -->


Supported Browsers: The browser supported by <body> Text Attribute are listed below: 

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!