CSS word-spacing 속성을 정의하여 단어 사이의 공백을 설정할 수 있습니다.
다음 예는 CSS 단어 간격 속성을 보여줍니다.
예시
<!DOCTYPE html>
<html>
<head>
<style>
div {
margin: 2%;
padding: 2%;
background-color: mediumorchid;
color: ivory;
word-spacing: 2.2cm;
}
div:last-of-type {
word-spacing: normal;
}
</style>
</head>
<body>
<div>I Don't Care! I Love It!</div>
<div>I Don't Care! I Love It!</div>
</body>
</html> 출력
이것은 다음 결과를 생성합니다 -

예시
<!DOCTYPE html>
<html>
<head>
<style>
article {
margin: 2%;
padding: 2%;
background-color: azure;
word-spacing: 2.2cm;
}
article:last-of-type {
word-spacing: normal;
}
</style>
</head>
<body>
<article>tldr; this article doesn;t mean anything</article>
<article>0123456789 is not a phone number</article>
</body>
</html> 출력
이것은 다음 결과를 생성합니다 -
