AgerNic.com
WEB DEVELOPER SITE, HTML, CSS, PHP, SQL
HTML Tutorial

CSS text-align property


CSS Tutorial » CSS text-align


The text-align property is used to specify the horizontal alignment of inline-level content such as text and images.
left - The default value.
right - Content aligns to the right side.
center - Content centers between the left and right edges.
justify - Content spaces out such that as many blocks fit onto one line as possible and the first word on that line is along the left edge and the last word is along the right edge.
inherit - The value will be whatever the parent element's is.

We can add CSS text-align as:
Inline - by using the style attribute in HTML elements
Internal - by using a <style> element in the <head> section
External - by using an external CSS file as style.css

Syntax:

Syntax: Internal & External CSS.
text-align: left or right or center or justify or initial or inherit;;

Note: use external CSS instead.


How to create CSS text align - examples


You can try to execute the following code to change CSS Text Align of a text on this page.

Example:
Example 1, How to create CSS Text Align - examples:

  <!DOCTYPE html>
<html>
<head>
<title>How to create CSS Text align - examples - example</title>
<style>
h1 {
text-align: center;;
}
p {
text-align: right;
}
span {
text-align: justify;
}
.text-al {
text-align: right;
}
</style>
</head>
<body>
<h1>Text Align Property for h1 center</h1>
<p>How to create CSS text-align Property for paragraph right</p><br />
<span>How to create CSS text-align Property for paragraph justify</span><br />
<div style="text-align:right; color:#33CC33">Ccreate CSS Text Align Property inline to right </div><br />
<div class="text-al">Ccreate CSS Text Align Property for div</div><br />
</body>
</html>
Note: Use external CSS instead.


css text-align, css text align vertical, css align center, vertical align middle, vertical align center, align content in div, vertical align text in div, how to place something in the middle css, float center css
CSS text-align - css tutorial

Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.


CSS Scrollbar Horizontal
CSS Scrollbar in Div
CSS Scrollbar Firefox
CSS Style Scrollbar
CSS Style Text
CSS background color
CSS Div Id Class
CSS Text Wrap
CSS text-align
CSS Text Decoration
CSS Text Shadow
CSS Text Color
CSS Text Bold
CSS Text Size
CSS background image full
CSS background opacity
CSS border radius
CSS rounded corners
CSS font color
CSS Class & ID
CSS align image center
CSS align content
CSS link color
CSS Text Style
CSS Text Font Size
CSS max width &height
CSS width and height
CSS Margin
CSS Padding
CSS Border Style
CSS background
CSS in HTML
Basic Syntax of CSS
CSS Introduction
Online Editor
ONLINE EDITOR

news templates


COLOR PICKER

news templates
This tool makes it easy to create, adjust, and experiment with custom colors for the web.


HTML Templates
news templates
Magnews2 is a modern and creative free magazine and news website template that will help you kick off your online project in style.


CSS HTML Layout
news templates
Find here examples of creative and unique website layouts.


Free CSS HTML Menu
news templates
Find here examples of creative and unique website CSS HTML menu.