direction : ltr | rtl
속성
text-align : start | end | left | right | center | justify | match-parent
속성
<html>
<head>
<meta charset="utf-8">
<style>
.align-left { text-align: left; }
.align-right { text-align: right; }
.align-center { text-align: center; }
.align-justify { text-align: justify; }
</style>
</head>
<body>
<p class="align-left">동해물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 만세!</p>
<p class="align-right">동해물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 만세!</p>
<p class="align-center">동해물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 만세!</p>
<p class="align-jutify">동해물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 만세!</p>
</body>
</html>
text-justify : auto | none | inter-word | distribute
속성
<html>
<head>
<meta charset="utf-8">
<style>
html, body { width: 100%; height: 100%; }
.justify-inter-word { text-justify: inter-word; }
.justify-distribute { text-justify: distribute; }
</style>
</head>
<body>
<div style="width: 300px;">
<p class="justify-inter-word">동해물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 만세.</p>
<p class="justify-distribute">동해물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 만세.</p>
</div>
</body>
</html>
text-indent: <크기> | <백분율>
속성
<html>
<head>
<meta charset="utf-8">
<style>
.indent1 { text-indent: 15px; }
.indent2 { text-indent: 5%; }
</style>
</head>
<body>
<p class="indent1">동해물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 만세.</p>
<p class="indent2">동해물과 백두산이 마르고 닳도록 하느님이 보우하사 우리나라 만세.</p>
</body>
</html>
[CSS 기초] 목록 스타일 (0) | 2021.04.23 |
---|---|
[CSS 기초] 문단 스타일 (2) (0) | 2021.04.21 |
[CSS 기초] 텍스트 스타일 (0) | 2021.04.19 |
[CSS 기초] 글꼴 관련 스타일 (2) (0) | 2021.04.16 |
[CSS 기초] 글꼴 관련 스타일 (1) (0) | 2021.04.15 |
댓글 영역