Home >Web Front-end >CSS Tutorial >How Can I Capitalize Only the First Letter of Text Using CSS?
In CSS, transforming the first character of a text to uppercase is a straightforward task using the text-transform property. This property offers various options for manipulating text capitalization.
For uppercasing the first character only:
<br>a.m_title {<br> text-transform: capitalize;<br>}<br>
By applying the capitalize value to the text-transform property:
<a class="m_title" href="">gorr</a> <a class="m_title" href="">trro</a> <a class="m_title" href="">krro</a> <a class="m_title" href="">yrro</a> <a class="m_title" href="">gwwr</a>
You can achieve the desired result, where the first character of each link's text is capitalized:
Gorr Trro Krrp Yrrp Gwwr
The above is the detailed content of How Can I Capitalize Only the First Letter of Text Using CSS?. For more information, please follow other related articles on the PHP Chinese website!