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="w3.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>
Output
In this Program use Text Alignments
This is a Left aligned text.
This is a Right aligned text.
This is a Centered Content

CSS Framework Website development using W3.CSS Framework. W3.CSS is a Framework W3.CSS is a modern CSS framework with built-in responsiveness ...
Read More
Read More
W3.Css Containers W3. CSS Containers is predefine class use just like a external CSS. The W3-Container class adds a 16px left ...
Read More
Read More
W3.CSS Background colors The w3-color classes set the background color for any HTML element. Example <!DOCTYPE html> <html> <title>W3.CSS</title> <link ...
Read More
Read More
W3.CSS Text colors The W3-text-color classes set the background color for any HTML element. Example <!DOCTYPE html> <html> <title>W3.CSS</title> <link ...
Read More
Read More
W3.CSS Hover Colors The W3-hover-color classes define the background hover color for any HTML element. The W3-hover-text-color classes define the text hover ...
Read More
Read More
W3.CSS Panels Panels are the same as containers but extra feature is to added top and bottom margin. The w3-panel ...
Read More
Read More
W3.CSS Borders w3-border : Using this class to add borders (top, right, bottom, left) to an element.w3-border-top : Using this ...
Read More
Read More
W3.CSS Bar Note : w3-topbar, w3-bottombar, w3-leftbar, and w3-rightbar classes are used to add thick borders to an element. w3-bottombar ...
Read More
Read More
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 ...
Read More
Read More
W3.CSS Wide Text The w3-wide classes are used for wider text. Example <!DOCTYPE html> <html> <title>W3.CSS</title> <link rel="stylesheet" href="w3.css"> <body> ...
Read More
Read More