Library tutorials & articles

Text formatting in HTML

Alignment and Spacing

Why stick to the left...

When you can hang out in the right...

or just chill in the center?


Want to know how to change the aligment of your text like that? It's simple! For having your text stick to the left, you just leave it as normal text. The left is default. If you want your text on the right, you'd use &ltp align=right> top open the tag and <p> to close the tag. Center is really simple. You just use &ltcenter> to open the tag, and <center> to close it.

Ever noticed how when you write an HTML document with, all your carriage returns seem to be gone when you veiw the page in your web browser? That's because you need special tags for these. To do carriage returns, you use &ltBR>. The &ltBR> tag is a little funny, because unlike most tags, it doesn't need a closing tag.

Another way to do this, instead of &ltBR> is using the &ltp> and <p> tags. Just put the opening P tag at the top of your paragraph, and the closing one at the bottom. These are the same as 2 BR tags.

Another way you can do formatting is using the &ltpre> tag. It gives you preformatted text, so [TAB] indents and carriage returns work. Remember to close it with <pre>.

That brings this tutorial to an end. I hope it has been helpful. If you want to ask me questions or comment on this tutorial, you can e-mail me at wipeoutgc@hotmail.com.

Comments

  1. 01 Jan 1999 at 00:00

    This thread is for discussions of Text formatting in HTML.

Leave a comment

Sign in or Join us (it's free).

Jamie Lindgren Uhm... I dunno why I'm typing this, cuz nobody is gonna read it probably, but anyway... I am (guess my age!! haha... 14) years old and I like programming, web design, and graphic design. I'm pursui...

Related discussion

Related podcasts

  • Top Web Design Mistakes

    Pete LePage is Product Manager of Internet Explorer Developer Division and he doesn’t want your web site to stink. Sharing from his talk given at TechEd 2008, Pete highlights 10 common web design mistakes and tells you how you can bypass the same blunders. Pete also tells us how future features o...

We'd love to hear what you think! Submit ideas or give us feedback