Word-spacing  편집

개요

이 속성은 요소에 포함된 단어 사이의 공백의 크기(단어간/어간)를 지정한다.

단어란 공백문자(white space)에 둘러싸인 문자열을 의미한다. (예: "word spacing"의 단어는 "word"와 "spacing" 2개며, "word-spacing"의 단어는 "word-spacing" 1개다.)

공백문자의 출력 방식은 white-space 속성으로 지정할 수 있다.

정의

Word-spacing설명
normal | <길이> | inherit
기본값normal
적용대상모든 요소
상속
백분율사용 불가
미디어visual

설명
normal기본 간격을 지정한다.
<길이>길이를 지정한다. 이 길이는 단어 사이의 간격에 추가되며, 글자를 양쪽정렬(justify)하려면 크기를 지정할 수 없다.
inherit부모 요소의 값을 상속하도록 지정한다.

예제

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
	p {word-spacing: 2em;}
</style>
</head>
<body>
	<p>단어의  간격을 정상 크기의 2배로 지정합니다.</p>
</body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
	p {word-spacing: -0.5em;}
</style>
</head>
<body>
	<p>단어의  간격을 정상 크기의 -0.5배로 지정합니다.</p>
</body>
</html>

브라우저 호환성

IE6?IE7?FF2?Op9?
normal지원지원지원지원
(Length)지원지원지원지원
inherit미지원미지원지원지원

 
Be Friend~! Be Friend~!