Home  >  Article  >  Web Front-end  >  What is the attribute that sets the spacing between English words in css?

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

王林
王林Original
2021-03-03 11:44:466197browse

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>

(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!

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