Which Measurement Unit should be used in CSS to set letter spacing

JavascriptWeb DevelopmentFront End Scripts

To set letter spacing with CSS, use the em measurement unit.

A relative measurement of the height of a font is em spaces. Because an em unit is equivalent to the size of a given font, if you assign a font to 12pt, each "em" unit would be 12pt; thus, 2em would be 24pt.


You can try to run the following code to use CSS to set letter spacing:

      <div style = "position:relative;left:90px;top:3px;background-color:yellow;letter-spacing: 2em;">
         This div has relative positioning.
Published on 13-Apr-2018 08:13:50