Rubious

CSS Quick Tips: text-transform

One of the great benefits of CSS is the ability to easily update or change the look of a whole website by only editing one file – the stylesheet. So whenever a heading is to be IN ALL CAPS, consider using the text-transform property.

h2 {
  text-transform: uppercase;
}
<h2>This header will be in all caps!</h2>

This allows you to write a header in the normal way, but have browsers interpret it as uppercase. Not only is this great for changing your mind later (you don’t have to re-write all those headings!) but it means your visitors can specify that they’d rather see headings in ‘sentence case’ by use of a user style sheet

Share:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • StumbleUpon
  • Tumblr
  • Yahoo! Buzz

Tags: ,

Comments are closed.