Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Web Design & Development > CSS

📄 Contents

  1. Alignment: Text
  2. Using P to Align Text
  3. Using DIV to Align Blocks of Text
  • Print
  • + Share This
Like this article? We recommend

Like this article? We recommend

Using DIV to Align Blocks of Text

More often than not, when you want to apply a specific alignment to a paragraph, you will want to apply that alignment to more than one paragraph at a time. That's what the DIV tag is for.

The DIV tag is a container, and it requires an end tag. By using DIV, you are effectively saying, "Apply this alignment from here to there." Here's an example:

<P> Ducks In A Row products represent a unique concept in rubber 
stamping. Our original designs created by Joan Farber, internationally
recognized illustrator, are unlike anything found in the stamp market 
<P>Joan Farber is a freelance illustrator, designer, fine artist, and teacher
who has done work for such notable companies as American Express,
CBS Records, Redken, MCI, Cosmopolitan, Playboy and Vogue
Magazines. With her early roots as a fashion illustrator, Joan has
developed a style of illustration which has become popular in recent
years, utilizing a skillfully calligraphic brush stroke which brings an
elegance and sophistication to any image.
<P>Because the style of art throughout the catalog is consistent, any of the
designs may be used together side by side or superimposed, making the
possibilities for personal expression boundless.

The DIV tag can be used with any of the ALIGN values that work with paragraphs: CENTER, LEFT, RIGHT, or JUSTIFY (see Figure 6).

Figure 6 Use the DIV tag to align a block of paragraphs.

  • + Share This
  • 🔖 Save To Your Account