How to Center Text in HTML

By eHow Internet Editor

Rate: (2 Ratings)

Most tasks in HTML can be accomplished by placing an instruction known as a "tag" before and after the text that you want to affect, and centering text is no exception. Text marked as centered will appear halfway between the left and right margins of the display window.

Instructions

Difficulty: Moderately Easy

Things You’ll Need:

  • Text file editor

Center Text in HTML

Step1
Open the program you're using to edit your web page, then open the page itself and position the cursor wherever you want the centered text to display.
Step2
Type the following:
.
Step3
Type the text you want to appear centered.
Step4
Type the following immediately after the last character of your citation: .
Step5
Open up your web page in a browser such as Firefox, Internet Explorer or Netscape to check that your text appears centered.

Tips & Warnings

  • HTML is a very precise science, so you must perform the steps with complete precision. If you get no effect, or if you get a stream of code-like characters showing up in your web page, go back and make sure you have every angle bracket (< and >) placed correctly.
  • Don't forget to close your center tag, or all your subsequent text will take be centered as well.
  • Though the center tag has not been phased out, more precise formatting can be achieved if you learn how to use a tool known as CSS style sheets, with the text-align property.

Post a Comment

POST A COMMENT

Request a New How-To Article

Looking for more How To information? Chances are there’s an eHow member who knows how to do what you’re looking to do. Submit an article request now!

eHow Article:  How to Center Text in HTML

eHow Internet Editor

eHow Internet Editor

Category: Internet

Articles: See my other articles

Related Ads

Internet

Veesites
Meet Virginia DeBolt eHow’s Internet Expert.