ArticleDirectory
- Description
- Script Syntax:
Definition
Text-TransformControls the letters in the element.
Inheritance:Yes
Description
This attribute changes the uppercase and lowercase letters of an element regardless of the text in the source document. If the value is capitalize, uppercase letters are required, but there is no explicit definition of which letters should be capitalized, depending on how the user agent identifies each "word ".
Javascript syntax
CSS attributes can also be dynamically changed through a piece of JavaScript.
Script Syntax:
Object. style. texttransform = "capitalize"
In our HTML Dom tutorial, you can find more details about the texttransform attribute.
In our HTML Dom tutorial, you can also find the complete style object reference manual.
Example
P {Text-Transform
: Uppercase}
Possible Value
Value |
Description |
None |
Default value. Defines standard text with lower-case letters and upper-case letters. |
Capitalize |
Each word in the text starts with an uppercase letter. |
Uppercase |
Only uppercase letters are defined. |
Lowercase |
It defines no upper-case letters and only lower-case letters. |
Tiy instance
-
Control letters in text
-
This example shows how to control letters in text.