Home >Web Front-end >CSS Tutorial >How to use css text-transform attribute

How to use css text-transform attribute

silencement
silencementOriginal
2019-05-27 14:32:434026browse

How to use css text-transform attribute

Definition and Usage

The text-transform property controls the case of text.

Description

This attribute will change the case of letters in the element, regardless of the case of the text in the source document. If the value is capitalize, some letters are capitalized, but it is not clearly defined how to determine which letters are capitalized, it is up to the user agent to recognize the individual "words".

How to use css text-transform attribute

Example, convert text in different elements

h1 {
text-transform:uppercase
}
h2 {
text-transform:capitalize
}
p {
text-transform:lowercase
}

Tips and notes

Notes: Different user agents may use different methods to determine where a word begins and, accordingly, which letters to capitalize. For example, the text "w3-school" can be displayed in two ways: "W3-school" and "W3-School". CSS doesn't specify which one is correct, so both are fine.

Possible values

How to use css text-transform attribute


# #

The above is the detailed content of How to use css text-transform attribute. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn