'text-align' Example : text align « CSS « HTML / CSS






'text-align' Example

 
    
<html>
<body>
<div id="myDiv" 
     style="text-align:center">
     Click to change alignment to right.
</div>
<button onclick="myDiv.style.textAlign='right';">Align Right</button>
</body>
</html>

    
      
        
  








Related examples in the same category

1.The text-align Property
2.text-align all possible values
3.text-align: justify
4.text-align:right;
5.text-align:left;
6.text align center
7.text-align: left;
8.text-align: center;
9.text-align: right;
10.text-align: justify;
11.text-align:left;right;center;justify;
12.Right align text
13.Text flows out of the boundaries