AlignmentHorizontal alignmentText and images can be aligned to left (this is the default) , right or centered:.left { text-align : left; } .right { text-align : right; } .center { text-align : center; }<DIV class="left">Text is aligned to left</DIV> Text aligned to left
<DIV class="right">Text is aligned to right</DIV> Text aligned to right
<DIV class="center">Text is centered</DIV> Text is centered
Text can also be justified. This means that the width of the text column is constant:
.justify { text-align : justify; }
<DIV class="justify">
An HTML document follows .....</DIV>
An HTML document follows a standard to describe his essential properties as the HTML version used,
the character encoding, and the content description.
The most important information is the character encoding.
It defines the translation of the HTML file in a readable text file, depending upon his language.
The universal character encoding, suitable for all languages, is called UTF-8 (Unicode).
Vertical alignmentText and images contained in a table cell can be aligned to the top , middle or bottom border:.top { vertical-align : top; } .middle { vertical-align : middle; } .bottom { vertical-align : bottom; }<TD class="top">This text is aligned to the top</TD>
<TD class="middle">This text is aligned to the middle</TD>
<TD class="bottom">This text is aligned to the bottom</TD>
FloatingWe may use the float property to distribute the text around a picture:.left { float: left; } .right { float: right; } .none { float: none; }<DIV><IMG class="left" SRC="house.jpg">Floating "left"...</DIV> Floating "left"...
<DIV><IMG class="right" SRC="house.jpg">Floating "right"...</DIV> Floating "right"...
<DIV><IMG class="none" SRC="house.jpg">Floating "none". This is the default.</DIV> Floating "none". This is the default.
Next page : how to define the appaerance of links. |