HTML/CSS/CSS Attributes and Javascript Style Properties/word spacing

Материал из Web эксперт
Перейти к: навигация, поиск

word-spacing: 10px

   <source lang="html4strict">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <html> <head> <title>css typography</title> <style type="text/css"> p {

   font-family: Verdana, arial, helvetica, sans-serif;
   font-size: 16px;
   letter-spacing: 2px;
   word-spacing: 10px;

} </style> </head> <body>

this is a test.

this is a test.

this is a test. this is a test. this is a test.

this is a test.

</body> </html>

</source>
   
  


word-spacing: -5px

   <source lang="html4strict">

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html>

   <head>
       <title></title>
       <style type="text/css">
     p {
         word-spacing: -5px;
     }
       </style>
   </head>
   <body>

a negative value.

   </body>

</html>

</source>
   
  


"word-spacing" Example

   <source lang="html4strict">
   

<html> <body>

This is a sample paragraph.


<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>


     </source>