'letter-spacing' Example : letter spacing « CSS « HTML / CSS






'letter-spacing' Example

  
    
<html>
<body>
<p id="myP">This is a sample text.</p>

<input type="button" 
       value="Set letterSpacing to 0.5mm" 
       onclick="myP.style.letterSpacing='0.5mm'">

<input type="button" 
       value="Set letterSpacing to 1mm" 
       onclick="myP.style.letterSpacing='1mm'">

<input type="button" 
       value="Set letterSpacing to normal" 
       onclick="myP.style.letterSpacing='normal'">
</body>
</html>

    
      
        
    
  








Related examples in the same category

1.letter-spacing (negative)
2.letter-spacing: 2px
3.letter-spacing: 5px;
4.letter-spacing: -1px;
5.letter-spacing:3px;
6.letter-spacing:normal;p.wide {letter-spacing:1.5em;p.narrow {letter-spacing:-.2ex;
7.Wide Letter Spacing
8.Narrow Letter Spacing
9.space between letters in the header is set to -1 pixels.
10.letter-spacing: .5em
11.letter-spacing: 10px
12.Set letter spacing to -0.1em
13.letter-spacing: normal