Transforming Text

Description

text-transform applies a transformation to a block of text.

Its possible values are: none capitalize uppercase lowercase.

The default value is none.

Example

The following code shows how to use the text-decoration and text-transform Properties.


<!--  w w w .ja  v  a  2 s .  c  om-->
<html>
<head>
<style type='text/css'>
body {
    font: 14px sans-serif;
}
p {
    padding: 5px 25px;
    background: mistyrose;
    border: 1px solid orange;
}
span.lower {
    text-transform: lowercase;
}
span.upper {
    text-transform: uppercase;
}
span.capitalize {
    text-transform: capitalize;
}
span.example {
    background: pink;
}
</style>
</head>
<body>
    <h4>Manipulating Case With the text-transform Property</h4>
    <p>
        <span class='lower example'>UPPERCASE TEXT LOWERCASE</span>
        <span class='upper example'>lowercase text uppercase</span>
        <span class='capitalize example'>capitalize every word in a sentence</span>.
    </p>
</body>
</html>

Click to view the demo





















Home »
  HTML CSS »
    CSS »




CSS Introduction
CSS Background
CSS Border
CSS Box Layout
CSS Text
CSS Font
CSS Form
CSS List
CSS Selectors
CSS Others
CSS Table