1. The word-spacing attribute is used to set the distance between tags or words in HTML pages. This attribute is valid for English, but not for Chinese.
2. There are three types of word-spacing attribute values, Normal, length value and percentage.
As shown below:
Normal: This value is determined based on the normal spacing of the current font.
Length value: Specifies the spacing between words instead of the default spacing.
Percentage: Specify the spacing between words as a percentage, replacing the default spacing.
Example
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <style> body { margin: 100px; } p { font-size: 16px; letter-spacing: 0px; word-spacing: 5px; line-height: 30px; } </style> </head> <body> <div> <p>hello hello hello hello</p> <p>Test code location test code location</p> <p>Test code locationTest code location</p> </div> </body> </html>
The above is an introduction to CSS word spacing. I hope it will be helpful to everyone.
More css learning guide: css tutorial