dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Tip: Capitalize the First Letter of Every Word with CSS

Learn how to use the text-transform property in CSS to capitalize the first letter of every word.


advertisement

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Use the text-transform property with the 'capitalize' value to capitalize the first letter of the words in an element.

For example:

div { text-transform: capitalize; }
<div>this is a statement that requires first letter to be capitalized </div>

would become:

<div>This Is A Statement That Requires First Letter To Be Capitalized </div>

 

Visit the DevX Tip Bank

 





   
Srinath M. S. says: "I would love to leave a footprint in this flat world."
Thanks for your registration, follow us on our social networks to keep up-to-date