Letter spacing and word spacing : word spacing « CSS « HTML / CSS






Letter spacing and word spacing

   
<!DOCTYPE html> 
<html> 
<head>
<title></title> 
<style type="text/css"> 
p { font-family: verdana,sans-serif; } 
p:before { content: attr(style) " "; font-weight: bold; } 
h4.wide { word-spacing: 2em; } 
</style> 
</head> 
<body> 
<h4 class="wide">Paragraphs with different <em>letter-spacing</em></h4> 
<p style="letter-spacing: normal;">Lorem ipsum dolor sit amet, ...</p> 
<hr/> 
<p style="letter-spacing: -1px;">Lorem ipsum dolor sit amet, ...</p> 
<hr/> 
<p style="letter-spacing: 0.5em;">Lorem ipsum dolor sit amet, ...</p> 
</body> 
</html> 

   
    
    
  








Related examples in the same category

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