What is the attribute that sets the spacing between English words in css?

王林
Release: 2023-01-03 09:27:17
Original
6186 people have browsed it

The attribute that sets the spacing between English words in css is word-spacing. The word-spacing attribute can increase or decrease the space between words, such as [p{word-spacing:30px;}].

What is the attribute that sets the spacing between English words in css?

The operating environment of this article: windows10 system, css 3, thinkpad t480 computer.

There is a word-spacing attribute in css, which can be used to set the spacing between words.

Attribute introduction:

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

Attribute value:

  • normal Default. Define the standard space between words.

  • #length defines the fixed space between words.

  • #inherit Specifies that the value of the word-spacing attribute should be inherited from the parent element.

Specific code:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"> 
<title>php.cn</title> 
<style>
p
{ 
    word-spacing:30px;
}
</style>
</head>
<body>

<p>
This is some text. This is some text.
</p>

</body>
</html>
Copy after login

(Learning video sharing: css video tutorial)

Running results:

What is the attribute that sets the spacing between English words in css?

Related recommendations: CSS tutorial

The above is the detailed content of What is the attribute that sets the spacing between English words in css?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
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