align attribute affects the contents of the
p, aligning content to the
"center", or setting it
"justify" on the page.
This attribute is
deprecated—the correct method for aligning a
p is to
use the CSS
Figure 1 shows the effects of the
The dotted red border and the gap (margin) between each paragraph have been applied simply to demonstrate alignment more clearly.
attribute below will center the content inside the two paragraphs (but CSS
could—and should—be used to set the alignment):
<p align="center"> Starter: Fruit Salad </p> <p align="center"> Main Course: Roast Duck </p>
The accepted values are
"justify" is chosen, text is adjusted so that words
stick to both the left and right edges of the containing element, with the
final line left-justified. Some unsightly effects can occur when you’re
"justify", as the browsers don’t have great
rendering engines for this type of effect, and can cause “rivers” in
blocks of text (that is, large gaps can appear to flow down through the
Every browser listed supports this attribute.
There are no comments yet.