Video:How to Align Text in a CSS documentwith Don Schechter
This video demonstrates how to align text in a CSS document for your websiteSee Transcript
Transcript:How to Align Text in a CSS documentToday I will show you how to align text in a CSS document for your website.
Choose a CSS FileFirst open notepad, or if you are using a Mac open simple text. I'm going to use a previously saved CSS document. The paragraph tag is the first place to organize the content your web page. Paragraphs are set by default to align on the left. You can change the alignment using the text-align property. Type p, brace, enter, tab, text, dash, align, colon, right, semicolon. Don t forget to close the brace.
Save your CSS file and open your HTML file in a browser to see your changes. Everything that is within a paragraph is now aligned to the right. You can type center, which will center all the text within a paragraph tag. Or you can justify the text which will stretch the words across the paragraph block on both the left and right sides.
Align the ParagraphI want to align just this one paragraph to the right side. To align a single paragraph, in your CSS document type p, dot, right, brace, enter, tab, text dash align, colon right semicolon. Don t forget to close the brace. Save your CSS file and open your HTML file in your text editor. Within the paragraph tag that you want to align, type class equals right in quotes. Now in my browser you will see that this paragraph is aligned on the right.
About videos are made available on an "as is" basis, subject to the User Agreement.