{"id":14138,"date":"2013-03-11T19:42:47","date_gmt":"2013-03-12T02:42:47","guid":{"rendered":"http:\/\/css-tricks.com\/?page_id=14138"},"modified":"2022-05-31T07:23:54","modified_gmt":"2022-05-31T14:23:54","slug":"word-spacing","status":"publish","type":"page","link":"https:\/\/css-tricks.com\/almanac\/properties\/w\/word-spacing\/","title":{"rendered":"word-spacing"},"content":{"rendered":"\n

The word-spacing<\/code> property is similar to letter-spacing<\/code><\/a>, though naturally its use governs the amount of space between the words in a piece of text, not the individual characters.<\/p>\n\n\n\n

.element {\n  word-spacing: .75em;\n}<\/code><\/pre>\n\n\n\n

word-spacing<\/code> can receive three different values:<\/p>\n\n\n\n

  1. the \u201cnormal\u201d keyword, which resets the default spacing<\/li>
  2. length values using any CSS units (most commonly px<\/i>, em<\/i>, rem<\/i>)<\/li>
  3. the \u201cinherit\u201d keyword, which applies the word-spacing<\/code> of the parent element<\/li><\/ol>\n\n\n\n

    Best practice at this time would be to use em<\/code>. Font size can be adjusted, so using pixels for this could cause problems at the spacing between words wouldn’t scale as their size did. rem<\/code> is great usually, but browser support is lower and in this use case it’s probably best the spacing is relevant directly to the words it is being applied to, not the root.<\/p>\n\n\n\n

    \"\"<\/figure>\n\n\n\n

    It is important to note that \u201cword\u201d in this context actually refers a singular piece of inline content\u2014which means that word-spacing<\/code> affects inline-block<\/code> elements as well as inline<\/code> elements. In this example, several such elements are spaced by setting the word-spacing<\/code> of their parent container:<\/p>\n\n\n\n