Home > Web Front-end > Front-end Q&A > What is the CSS3 style to set word spacing?

What is the CSS3 style to set word spacing?

WBOY
Release: 2022-03-22 12:01:29
Original
2199 people have browsed it

The CSS3 style for setting word spacing is "word-spacing: word spacing value;"; the "word-spacing" attribute is used to increase or decrease the space between words, so you can set the space between words. The spacing can also be set to negative values.

What is the CSS3 style to set word spacing?

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

What is the CSS3 style for setting word spacing?

When making English web pages, sometimes the words in our English introduction, if we want to have spacing between words, how to achieve it? ? We need to use the word-spacing attribute to set it.

We create a new HTML web page file and name it test.html. Next, we use the test.html file to explain how to set word intervals in CSS. Use the div tag to create a line of text "How to set word interval in CSS" and translate the text content into English "How to set word interval in CSS". Add a style to the div tag and set the class attribute of the div tag to mybkkd.

What is the CSS3 style to set word spacing?

##Write the css style tag, and the mybkkd style will be written in the tag.

Set the distance between texts through the class attribute mybkkd of the div tag. Within the brackets, mybkkd's div sets the css attribute style to word-spacing:8px;, and the word spacing is 8px

What is the CSS3 style to set word spacing?

Browse test.html in the browser and take a look. Whether the effect can be achieved.

What is the CSS3 style to set word spacing?

Notes

1. Create a test.html page.

2. In test.html, use the div tag to create a line of text and add the style name.

3. In css, set the style of mybkkd to word-spacing:8px; the word spacing is 8px

4. Word-spacing only works for English word spacing, but for Chinese It doesn't work. If you want the spacing between words, use the letter-spacing attribute.

5. Word-spacing is the spacing between English words, and letter-spacing is the spacing between words, which works for both Chinese and English.

(Learning video sharing:

css video tutorial)

The above is the detailed content of What is the CSS3 style to set word spacing?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
css
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template