Use CSS to format text

Some people don't realize that CSS can format text. For instance, you could hard-code all your titles in all caps(you probably shouldn't ever do that) but what are you going to do when you go to redesign & don't want all your titles in all caps? You'd have to go & retype every title on your entire site. CSS has a couple of properties that will allow you to type your titles any way you want & they will all be formatted the same.

Text-Transform

Text-transform, the property we are talking about, has three properties that you can pass it. Capitalize, uppercase, & lowercase. Capitalize literally capitalizes the first letter in each word, uppercase capitalizes every letter in each word, & lowercase capitalizes none of the letters in each word.

Examples

This IS Capitalized.

THIS IS UPPERCASE.

this is lowercase.

The CSS


#div h1 { text-transform: capitalize/uppercase/lowercase; }

Anonymous said...

3

Anonymous said...

who in the world doesnt know that css formats text?

Post a Comment

Going Up?