Home > Article > Web Front-end > How to capitalize English first letters in css
You can use the text-transform attribute in css to set the capitalization of the first letter of English. The text-transform attribute can control the capitalization of text. You only need to set the "text-transform:capitalize;" code style for elements containing English alphabetical text to capitalize the first letter.
The operating environment of this tutorial: Windows 7 system, CSS3&&HTML5 version, Dell G3 computer.
css sets the capitalization of the first letter of English
In css, you can use the text-transform attribute to set the capitalization of the first letter of English.
Example:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style type="text/css"> p.capitalize {text-transform: capitalize} </style> </head> <body> <p class="capitalize">This is some text in a paragraph.</p> </body> </html>
Rendering:
CSS video tutorial]
css text-transform property
The text-transform property controls the case of text. Attribute value: For more programming-related knowledge, please visit:Programming Video! !
The above is the detailed content of How to capitalize English first letters in css. For more information, please follow other related articles on the PHP Chinese website!