Table of Contents
W3.CSS Text Alignment
- The w3-left-align classes are used for left alignment elements.
- The w3-right-align classes are used for right alignment elements.
- The w3-center class is used for center-alignment elements.
Example
<!DOCTYPE html>
<html>
<title>W3.CSS</title>
<link rel="stylesheet" href="https://nielitbhu.com/w3file.css">
<body>
<div class="w3-container">
<h2> In this Program use Text Alignments</h2>
<div class="w3-container w3-border w3-large">
<div class="w3-left-align"><p> This is a Left aligned text.</p></div>
<div class="w3-right-align"><p>This is a Right aligned text.</p></div>
</div>
</div>
<div class="w3-container w3-center">
<h2> This is a Centered Content</h2>
<img src="w3css.jpg" alt="car" style="width:80%;max-width:320px">
</div>
</body>
</html>