Using negative values:
document.getElementById("myP").style.letterSpacing = "-2px";
<!DOCTYPE html> <html> <body> <p id="myP">This is an example paragraph.</p> <button type="button" onclick="myFunction()">Set letter spacing</button> <script> function myFunction() {//from w w w . j ava 2s .c o m document.getElementById("myP").style.letterSpacing = "-2px"; } </script> </body> </html>