Home>Article>Web Front-end> How to set word spacing in css

How to set word spacing in css

藏色散人
藏色散人 Original
2020-12-24 09:42:59 5584browse

In CSS, you can set the spacing between words through the "word-spacing" attribute. The usage syntax is such as "p{word-spacing:30px;}". This attribute can make the word spacing smaller, or you can get bigger.

How to set word spacing in css

The operating environment of this tutorial: Windows 7 system, HTML5&&CSS3 version, Dell G3 computer.

Recommended: "css video tutorial"

CSS uses the word-spacing attribute to set the spacing between words. For example:

How to set word spacing in css

As you can see, the word-spacing attribute can make the word spacing smaller or larger.

The word-spacing property increases or decreases the space between words.

How to set word spacing in css

However, for Chinese, CSS cannot distinguish words, so use the letter-spacing attribute to adjust the spacing between words.

You need to put the characters whose spacing needs to be adjusted inside the same tag, such as

. If there is a distance between different labels, you can use margin (outer margin) or padding (inner margin).

For more programming related knowledge, please visit:Programming Video! !

The above is the detailed content of How to set word spacing in css. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn