
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
Align the text of a document with CSS
The text-align property is used to align the text of a document. Possible values are left, right, center, justify.
Example
You can try to run the following code to align text:
<html> <head> </head> <body> <p style = "text-align:right;"> Asia is a continent. </p> <p style="text-align:center;"> Asia is a continent. </p> </body> </html>
- Related Articles
- Align the text of a paragraph with CSS
- Align the last line of the text with CSS
- Center image using text-align center with CSS?
- CSS text-align-last property
- Usage of text-align property in CSS
- How to Justify Text using text-align & text-justify CSS Properties?
- Align text and select boxes to the same width with HTML and CSS
- Align flex lines with CSS
- Set the direction of a text with CSS
- Indent the text of a paragraph with CSS
- Set the text shadow around a text with CSS
- Align flex items at the center of the container with CSS
- Align flex items at the beginning of the container with CSS
- Align flex items at the end of the container with CSS
- Set the height of a line of text with CSS

Advertisements