Javascript examples for CSS Style Property:letterSpacing
Get the letter spacing of a <p> element:
<!DOCTYPE html> <html> <body> <p id="myP" style="letter-spacing:10px;">This is an example paragraph.</p> <button type="button" onclick="myFunction()">Return letter spacing of p</button> <script> function myFunction() {/* ww w. j a v a 2 s . c om*/ console.log(document.getElementById("myP").style.letterSpacing); } </script> </body> </html>