css text spacing code example
Example 1: letter spacing css
div{
letter-spacing: 2px;
}
Example 2: letter spacing css
div{
letter-spacing: 2px;
}
Example 3: kerning css
// There is no kerning property, but you can use letter-spacing
div{
letter-spacing: 2px;
}
Example 4: letter spacing css
.some-class {
letter-spacing: 3px;
}
Example 5: how to create space inbetween text css
<div style="letter-spacing: 1em;">It's a wide wide word!</div>
<div style="line-height: 1.5;">
<div style="text-indent: 50px;">
Example 6: letter spacing css
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Letter spacing in CSS</title>
<style>
.normal {
letter-spacing: normal;
}
.em-wide {
letter-spacing: 0.4em;
}
.em-wider {
letter-spacing: 1em;
}
.em-tight {
letter-spacing: -0.05em;
}
.px-wide {
letter-spacing: 6px;
}
</style>
</head>
<body>
<p class="normal">letter spacing</p>
<p class="em-wide">letter spacing</p>
<p class="em-wider">letter spacing</p>
<p class="em-tight">letter spacing</p>
<p class="px-wide">letter spacing</p>
</body>
</html>