CSS Text

Home / CSS / CSS Text

CSS Text


CSS-Text:
Text Color:
color: Specifies the color of the text using color names, hexadecimal codes, RGB values, or other valid CSS color representations.
Text Alignment:

text-align: Determines the horizontal alignment of text within an element. Common values include left, center, right, and justify.

Text Decoration:
text-decoration: Controls decorations applied to text, such as underline, overline, line-through, or none.
Text Spacing:
letter-spacing: Adjusts the space between characters in text.
word-spacing: Adjusts the space between words in text.
Text Transform:
text-transform: Changes the capitalization of text. Options include uppercase, lowercase, capitalize, and none.
Line Height:
line-height: Sets the vertical space between lines of text. It can be specified as a unitless number or as a relative value.

Example:

 
<style>
    div{
      width: 500px;
      height: 250px;
      background-color: aqua;      
    }
   .para1{
    color: red;
   }  
   .para2{
    text-align: center;
   }  
   .para3{
    text-decoration: none;
   }  
   .para4{
    letter-spacing: 5px;
    word-spacing: 5px;
   }  
   .para5{
    text-transform: uppercase;
   }  
   .para6{
    line-height: 10px;
   }  
  </style>
</head>
<body>
  <div>
  <p class="para1">Sakasham Digital Technology</p>
  <p  class="para2">Sakasham Digital Technology</p>
  <p  class="para3">Sakasham Digital Technology</p>
  <p  class="para4">Sakasham Digital Technology</p>
  <p  class="para5">Sakasham Digital Technology</p>
  <p  class="para6">Sakasham Digital Technology</p>
</div>

Output: