CSS Text Background Color

CSS Text Background Color property is used to set background color of text. We can set different background color like yellow, green, red,black, purple, white, blue, orange etc. using background-color property.

Syntax:

By Hex Code,

background-color: #660000;

By RGB,

background-color:rgb(255,0,0);

By color name,

background-color:red;

Example :

<html>
<head>
    <title>Learn Css text background color tutorials</title>
</head>
<body>
  <p style="background-color:#FF0000">Learn Css text background color tutorials by aryatechno</p>
</body>
</html>

Output :

Learn Css text background color tutorials by aryatechno

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

71723