CSS – Cascading Style Sheet
In this lecture you will learn Aligning Text and displaying
The text-align property is used to set the horizontal alignment of a text.
A text can be aligned as left, right, centered, or justified.
The following example shows center aligned, and left and right aligned text (left alignment is default if text direction is left-to-right, and right alignment is default if text direction is right-to-left):
for instance fonts css examples with source code here:
Heading 1 (center)
Heading 2 (left)
Heading 3 (right)
The three headings above are aligned center, left and right.
in the above shown example applied aligning text in css to a html tag elements, in this example source code written in p tag is applied on style attribute with parameters are having with their values.
similarly one p tag of html element is also applied for aligning text