Specifying the Space Between Letters

Description

letter-spacing sets the space between letters.

Its value can be:normal or CSS length value.

Example


<!--from  ww  w .  j av a  2  s . c  o  m-->
<html>
<head>
<style rel="stylesheet" type="text/css">
p.normal {
    letter-spacing: normal;
}

p.wide {
    letter-spacing: 1.5em;
}

p.narrow {
    letter-spacing: -.2ex;
}
</style>
</head>
<body>
    <p class="normal">This paragraph has normal letter-spacing.</p>
    <p class="wide">This paragraph uses a 1.5em letter-spacing.</p>
    <p class="narrow">This paragraph uses a -.2ex letter-spacing.</p>
</body>
</html>

Click to view the demo





















Home »
  HTML CSS »
    CSS »




CSS Introduction
CSS Background
CSS Border
CSS Box Layout
CSS Text
CSS Font
CSS Form
CSS List
CSS Selectors
CSS Others
CSS Table