Lesson 5: Aligning Text


Return to Lesson 4

Continue on with Lesson 6


You can change the position of the text on a page by adding an alignment tag. These tags are added within already existing tags, such as paragraph or heading tags. ALIGN=CENTER will center the item ALIGN=RIGHT will move the item to the right margin of the page If you do not specify alignment the object will automatically be aligned on the left. Assignment 5 Open the assignment from lesson 4 and make the following changes: <HTML> <HEAD><TITLE>Aligning Paragraphs on the Web</TITLE> </HEAD> <BODY> <H1 ALIGN=CENTER>Aligning Paragraphs on the Web</H1> <P>By placing the paragraph tag at the beginning of the paragraph, I have told the computer that this is a <I>new paragraph</I> and to behave accordingly and skip a line and then begin on the next line. </P> <P ALIGN=RIGHT>See how easy this is? HTML is not hard as long as you remember to put the closing tags where you need them. When you forget the computer does all sorts of things that it shouldn't because you didn't tell it to stop doing something. <P> See that last time we did <B>not</B> put the closing tag and the computer still knew to begin another paragraph. This tag does not require the closing tag. It is optional. </BODY> </HTML> end of lesson