CSS Introduction

CSS Tutorial What is CSS CSS Syntax CSS Selector How to include CSS CSS Comments

CSS Attributes

CSS Background CSS Border CSS Display CSS Float CSS Font CSS Color CSS Hover CSS Important CSS Line-height CSS Margin CSS Opacity CSS Filter CSS Images CSS Overflow CSS Padding CSS Position CSS Vertical align CSS White space CSS Width Word-wrap in CSS Box-shadow in CSS Text-transform in CSS CSS Outline CSS Visibility CSS Counters CSS Clear fix CSS Icons CSS Justify-content Text-decoration in CSS CSS Lists CSS nth selector CSS Sticky CSS Background-clip CSS Checkbox-style CSS Letter-spacing CSS Navigation bar CSS Overlay CSS Root CSS Specificity CSS Text-indent CSS Text-stroke CSS Zoom CSS Order CSS Descendent selector CSS Clip CSS calc() CSS Background-blend-mode CSS radio-button CSS Superscript and subscript CSS Text-effects CSS Text-align CSS Variables CSS Page-break-before CSS Page-break-inside CSS Page-break-after CSS Content property CSS Word-spacing CSS Animation CSS @keyframes rules CSS Pseudo-classes CSS Pseudo-elements CSS Radial-gradient CSS Translate CSS Gradients CSS z-index CSS Loaders CSS Units CSS Transition CSS Masking CSS Arrow CSS Pagination

Questions

What is Bootstrap CSS What is CSS used for How to center a table in CSS What is a CSS File How to center a button in CSS How to change background color in CSS How to change the font in CSS How to change font size in CSS How to resize an image in CSS How to get rid of bullet pioints in CSS Is CSS a programming language How to edit CSS in WordPress How to use google fonts in CSS How to create blinking text using CSS How to Set Space between the Flexbox Is CSS a Programming Language

Difference

Difference between HTML and CSS Grid Vs Flexbox in CSS Difference between CSS Grid and CSS Flexbox

Misc

Create a 3D text effect using HTML and CSS Hover condition for a:before and a:after in CSS Bem CSS Boder Types CSS Features of CSS Font Face CSS Image Overlay CSS B Tag CSS Carousel CSS CSS Arrow CSS Focus Flex Grow in CSS Bem CSS Features of CSS Font Face CSS

CSS Text-Transform Property

Text-Transform in CSS

The text-transform property permits us to alter the text case. It controls the capitalization of the text. This property is employed to design the text appearance in every uppercase or every lowercase, or it may transform each word’s first character to uppercase.

Syntax:

text-transform: capitalize| uppercase| lowercase| none| initial| inherit;

 Let’s understand the above property values one by one with an example.

  • Capitalize

It transforms each word’s first character to uppercase. But, it can’t change any first letter after any number into the capitalized form. It can affect any word’s first letter only, rather changing the other letters of any word.

The letter in any word that has already defined in the capitalized form will not be switched to the lowercase form by using this property.
The example to describe the capitalize property is illustrated below:

Syntax:

text-transform: capitalize;

Example:

<!DOCTYPE html>
<html>
<head>
<title> Text-transform Property </title>
<style>
body
{
 text-align: center;
}
h1
{
 color: navy;
}
p
{
text-transform: capitalize;
}
</style>
</head>
<body>
<center>
<h1> Text-transform Property in CSS </h1>
<h2> text-transform: capitalize </h2>
<p> Hello World! </p>
<p> Welcome to this Page </p>
</body>
</html>

Output:

CSS Text-Transform
  • uppercase

As the name suggests, it transforms word’s every character into uppercase.

Syntax:

text-transform: uppercase;

Example:

<!DOCTYPE html>
<html>
<head>
<title> Text-transform Property </title>
<style>                
body
{
 text-align: center;
}
h1
{
 color: navy;
}
p
{
text-transform: uppercase;
}
</style>
</head>
<body>
<center>
<h1> Text-transform Property in CSS </h1>
<h2> text-transform: uppercase </h2>
<p> Hello World! </p>
<p> Welcome to this Page </p>
</body>
</html>

Output:

CSS Text-Transform
  • lowercase

This property can transform word’s every character into lowercase.

Syntax:

text-transform: lowercase;

Example:        

<!DOCTYPE html>
<html>
<head>
<title> Text-transform Property </title>
<style>
body
{
 text-align: center;
}
h1
{
 color: navy;
}
p
{
text-transform: lowercase;
}
</style>
</head>
<body>
<center>
<h1> Text-transform Property in CSS </h1>
<h2> text-transform: lowercase </h2>
<p> HELLO WORLD! </p>
<p> WELCOME TO THIS PAGE </p>
</body>
</html>

Output:

CSS Text-Transform
  • none

This property does not provide any capitalization and it is defined as a default value. It delivers any text form as it is.

Syntax:

text-transform: none;

Example:

<!DOCTYPE html>
<html>
<head>
<title> Text-transform Property </title>
<style>
body
{
 text-align: center;
}
h1
{
 color: navy;
}
p
{
text-transform: none;
}
</style>
</head>
<body>
<center>
<h1> Text-transform Property in CSS </h1>
<h2> text-transform: none </h2>
<p> Hello World! </p>
<p> Welcome to this Page </p>
</body>
</html>

Output:

CSS Text-Transform