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






'word-spacing' Example

  
    
<html>
<body>
<div id="myD" 
     style="width:400px; background-color:red;">
This is a sample paragraph.
</div>
<br>
<input type="button" 
       value="Set wordSpacing property to 10px" 
       onclick="myD.style.wordSpacing='10px'">
       
<input type="button" 
       value="Set wordSpacing property to 0.5cm" 
       onclick="myD.style.wordSpacing='0.5cm'">
       
<input type="button" 
       value="Set wordSpacing property to normal" 
       onclick="myD.style.wordSpacing='normal'">
</body>
</html>

    
      
        
    
  








Related examples in the same category

1.word-spacing: -5px
2.word-spacing: 10px
3.word-spacing: 15px;
4.word-spacing: -5px;
5.word-spacing: normal;
6.word-spacing: 3em;
7.word-spacing: -.5ex;
8.word-spacing:-1px;
9.Wide Word Spacing
10.Narrow Word Spacing
11.word-spacing:normal;p.wide {word-spacing:3em;p.narrow {word-spacing:-.5ex;}
12.Letter spacing and word spacing
13.Each letter of each word is ten pixels apart.
14.word spacing negative
15.word spacing: 10px
16.word-spacing: 3em|normal