Change Text alignment by CSS

<html>
<head>
<style>
body{
background:lightblue;
}
.center{
text-align:center;
}
.right{
text-align:right;
}
.left{
text-align:left;
}


</style>
</head>
<body>

<div class="center">
This is center class
</div>

<div class="right">
This is center class
</div>

<div class="left">
This is center class
</div>
<body>
</html>
The output is given below:

0 comments:

Post a Comment