how to add space between words in javascript 1

how to add space between words in javascript

   document.getElementById("text").style.wordSpacing = "25px";//change '25px' to your custom space

Here is what the above code is Doing:
1. We are selecting the element with the id “text”
2. We are changing the style of the element with the id “text”
3. We are changing the wordSpacing property of the element with the id “text”
4. We are setting the wordSpacing property to 25px

Similar Posts