• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 10. Text Properties > text-align Property

10.5. text-align Property

The text-align property is very handy for quickly aligning text on a Web page. It can take one of five values: left, right, center, justify and inherit. It is designed to be applied to block-level elements, such as headers or paragraphs, rather than inline formatting elements (such as <b> or <i>, for example).

For the most part, the values for text-align are self-explanatory. The inherit value takes on whatever parent value may hold for text-alignment. For those unfamiliar with the term, justification refers to how text is displayed between the margins. Full justification (which is what the justify value sets) means the browser will space the text contained within the paragraph fully across the two margins. In Figure 10-5 you'll notice how the unjustified sentence that follows the justified example is “ragged” — the words at the end of the right-margin are not flush against it.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint