I am trying to place a text that comes in UPPERCASE with the first letter mayúscula
and the others minúsculas
, the text cannot be modified by js
or by html
.
Is there any way to CSS
make this possible?
.let p {
text-transform: lowercase;
}
<div class="let">
<p>ESTO ES UNA INFORMACION QUE NECESITO QUE SEA LA PRIMERA LETRA MAYUSCULA Y LAS OTRAS MINUSCULAS</p>
</div>
You should lowercase the text and then capitalize the first letter using the following CSS selector:
:first-letter
.Staying as follows:
First you convert the entire paragraph to lowercase .
Then you apply the uppercase only to the first letter.
lowercase : displays all the text of the element with lowercase letters.
uppercase : displays all the text of the element with uppercase letters.
capitalize : Displays the first letter of each word as uppercase and all other letters as lowercase.
none : Displays the text as it is typed, respecting all upper and lower case.
You can make the label
take the element with the pseudo-elements, I can also recommend you to visit the www.w3schools.com site where you will find all the examples you may need about web pages. Here are 2 examples for the label
: