To change word spacing in paragraph using CSS, you can set the word-spacing
style property for the paragraph elements with the values like 40px
, 0.2in
, 0.4rem
, etc.
The following is the typical CSS code to change word spacing in paragraph in HTML page using tag name p
.
p {
word-spacing: 40px;
}
p {
word-spacing: 0.2in;
}
p {
word-spacing: 0.4rem;
}
We shall go through some working examples on how to change word spacing in paragraph using CSS. In the following examples, you may change the value of word-spacing and Run the code to visually observe the changes made to the Paragraph elements.
This is an example on how to change word spacing in paragraph using word spacing in pixels.
You may edit the following code, and click on Run button.
This is an example on how to change word spacing in paragraph using word spacing in inches.
You may edit the following code, and click on Run button.
This is an example on how to change word spacing in paragraph using word spacing relative to parent dimensions.
You may edit the following code, and click on Run button.