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.
<!DOCTYPE html>
<link rel="stylesheet" href="">
<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 class="w3-container w3-center">
<h2> This is a Centered Content</h2>
<img src="w3css.jpg" alt="car" style="width:80%;max-width:320px">

English Hindi