<div class="container">
<p class="text-left">Aligns the text to the left. This value is standard, so there are no visible effects</p>
<hr>
<p class="text-center">Centers the text. This text stands out more in relation to aligns the text to the left</p>
<hr>
<p class="text-right">Aligns the text to the right. It is more difficult to read because of the different location of the beginning of the line</p>
<hr>
<p class="text-justify">Stretches the lines so that each line has equal width. Note that the text margins between words is unequal</p>
</div>
body {
color: #333333;
}
.container {
width: 300px;
padding: 20px 30px;
background: #fbfbfb;
}
.text-left {
text-align: left;
}
.text-center {
text-align: center;
}
.text-right {
text-align: right;
}
.text-justify {
text-align: justify;
}
This Pen doesn't use any external CSS resources.
This Pen doesn't use any external JavaScript resources.