1, the horizontal alignment of the paragraph
The horizontal alignment of a paragraph in CSS is controlled by the property text-align, and its value can be set to left, middle, right, and justified.
p{Font-size:12px;} p.left{text-Align:left;} p.right{text-Align:right;} p.center{text-Align:center;} p.justify{text-align:justify;}/*Justify on both sides*/--></style>class=" Left"> This paragraph is left-aligned, text-align:left, so the text is left-aligned. <br/>The moonlight before the bed, is suspected to be ground frost. <br/> Jutou Look at the moon, bow to think home. <br/> Li Bai </p><pclass=" Right"> This paragraph is text-align:right by right-aligned, so the text is right-aligned. <br/>The moonlight before the bed, is suspected to be ground frost. <br/> Jutou Look at the moon, bow to think home. <br/> Li Bai </p><pclass="Center"> This paragraph is centered, Text-align:center, so the text is aligned in the center. <br/>The moonlight before the bed, is suspected to be ground frost. <br/> Jutou Look at the moon, bow to think home. <br/> Li Bai </p><pclass="Justify"> This paragraph is justified by text-align:justify, so the text is justified by both ends. <br/>The moonlight before the bed, is suspected to be ground frost. <br/> Jutou Look at the moon, bow to think home. <br/> Li Bai </p></body>2, the vertical alignment of the paragraph
The vertical alignment of paragraph text in CSS is achieved through the Vertical-align property. For the text itself, this property does not work for block-level elements, such as <p> and <div> tags. But for tables, this attribute is very important.
td.top{Vertical-Align:top;} td.bottom{Vertical-Align:bottom;} td.middle{Vertical-Align:middle;} span.zs{Vertical-align:10px;} span.fs{Vertical-align:-10px;}--></style>"2"cellspacing="0"Border="1"><tr><td>"02.jpg"Border="0"></td><tdclass="Top"> Vertical alignment, top</td></tr><tr><td>"02.jpg"Border="0"></td><tdclass="Bottom"> Vertical alignment, bottom</td></tr><tr><td>"02.jpg"Border="0"></td><tdclass="Middle"> Vertical alignment,middle</td></tr></table><p> Set specific <span for alignment propertiesclass="ZS"> numeric </span>, positive </p><p> set specific <span for alignment propertiesclass="FS"> numerical </span>, negative </p></body>Tenth Chapter CSS paragraph text