HTML text attribute
Example
Set the text color in the HTML document:
Hello world!
This is some text.
Try it »
Browser support





All major browsers support the text property.
Definition and Usage
HTML5 no longer supports the text attribute. Please use CSS instead.
The text attribute was deprecated in HTML 4.01. in HTML 4.01.The text attribute specifies the text color of the HTML document.
Compatibility notes
In HTML 4.01, the text attribute of the body element is deprecated; in XHTML 1.0 Strict DTD, the text attribute of the body element is not supported. Please use CSS instead.
CSS syntax ( section):
CSS example: set the text color in the document
In our CSS tutorial, you can find more details about text color attribute knowledge.
HTML Tag