Text-align's introduction:
Grammar:
Text-align:left | Right | Center | Justify
Parameters:
Left: Right-justified
Right: Justify
Center: Center
Justify: Justify on both sides
Description
Sets or retrieves the alignment of text in an object.
The corresponding script attribute is textalign. Please refer to the other bibliography I have written.
Example:
p {text-align:center;}
What is the difference between text-align and align in HTML?
1.align: Specifies the horizontal alignment of the content in the P element.
2.text-align: Specifies the horizontal alignment of the text in the element.
Two properties use a different place, but it works the same! Align is relatively "narrow", for example:
Align (Align is the property of P):
<p align= "center" >this is some text!</p>
Text-align (Text-align is the property of CSS):
<p style= "Text-align:center" >
Both allow the content of p to be centered.
Align: Specifies the horizontal alignment of the content in the P element.
Text-align: Specifies the horizontal alignment of the text in the element.
Two properties use a different place!
<p align= "Center" > This is some text!</p>
Align write directly on the attribute that is P
<p style= "Text-align:center" >
Text-align is the property of CSS
The align attribute of the P element is not supported in the XHTML 1.0 Strict DTD.
Please use CSS instead.