Page Widget How to - Make text capitalization Title case








Question

We would like to know how to make text capitalization Title case.

Answer


<!DOCTYPE html>
<html>
<head>
<style type='text/css'>
h2 {<!--  w  w  w. j av a 2 s .  co  m-->
  text-transform: lowercase;
}

h2:first-letter {
  text-transform: capitalize;
}
</style>
</head>
<body>
  <h2>are there OTHER USES for this medicine?</h2>
</body>
</html>

The code above is rendered as follows: