CSS: Alignment of a paragraph

This entry is part 25 of 26 in the series Basic CSS

In Microsoft Word, we have always been able to align text in a paragraph.

In HTML, we can apply alignment to paragraphs, list items, headings and so on.

You can align text using left, justify, right and center.

    <style>
        #left {
            text-align: left;
        }

        #justify {
            text-align: justify;
        }

        #right {
            text-align: right;
        }

        #center {
            text-align: center;
        }
    </style>

Series Navigation<< CSS: Setting All Border Attributes At Once
CSS: Vertical space within a paragraph >>