Formatting text in upper case - upper case

Asked

Viewed 13,435 times

3

I am building an application using PHP and I am beginner in systems development. How do I format the text fields for all uppercase letters?

2 answers

5

0

Carlos, the formatting of text is proper FRONT-END language, like html, css, javascript and others, in PHP the function of string strtoupper($text) can help you, but the most correct way is up to CSS with the argument 'font-Variant' bringing something like 'small-caps', you can have a class that returns all the text in versalete for example.

You can have the same effect in javascript:

getElementByTagName("INPUT").style.fontVariant="small-caps";

<input type="text" value="default text" class="versalete" />

in css:

.versalete{font-variant:small-caps;}
  • 1

    legal extra code information, but typographically, uppercase and small-caps are completely different things. Uppercase causes all letters to be uppercase (shape and size). Small-caps causes lower case letters to be displayed in upper case and lower case size (x-height).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.