How to Center Text in HTML

Prepare to edit HTML web pages by learning the basics of HTML code., Find the text that you want to center in your web page. , Place the tag "center" in brackets before the start of the text., Place the tag "/center" in brackets after the end of the...

5 Steps 1 min read Medium

Step-by-Step Guide

  1. Step 1: Prepare to edit HTML web pages by learning the basics of HTML code.

    View the various tags you can use to change the font or formatting of text.

    For example, a small "b" in a bracket is used to identify bold text.

    A small "i" is used to identify italic text.

    Do not include the quotation marks in your code.

    Practice pairing tags.

    Most formatting tags require 2 tags, at the beginning and end of the text that you want to change.

    The first tag will include the letters or symbols of the tag in brackets (<>).

    The second tag will include a backslash before the tag.

    For example, you would put "b" in brackets at the beginning of the bolded text and "/b" in brackets after the bolded text.
  2. Step 2: Find the text that you want to center in your web page.

    , Do not place any spaces between the tag and the text. , Do not include any spaces. , View it to make sure you have aligned the text properly.

    If this did not change the alignment of your text, then you are using a program, like HTML5 that uses CSS instead of HTML coding.

    Try the second method to correctly align the text.
  3. Step 3: Place the tag "center" in brackets before the start of the text.

  4. Step 4: Place the tag "/center" in brackets after the end of the text.

  5. Step 5: Save your web page.

Detailed Guide

View the various tags you can use to change the font or formatting of text.

For example, a small "b" in a bracket is used to identify bold text.

A small "i" is used to identify italic text.

Do not include the quotation marks in your code.

Practice pairing tags.

Most formatting tags require 2 tags, at the beginning and end of the text that you want to change.

The first tag will include the letters or symbols of the tag in brackets (<>).

The second tag will include a backslash before the tag.

For example, you would put "b" in brackets at the beginning of the bolded text and "/b" in brackets after the bolded text.

, Do not place any spaces between the tag and the text. , Do not include any spaces. , View it to make sure you have aligned the text properly.

If this did not change the alignment of your text, then you are using a program, like HTML5 that uses CSS instead of HTML coding.

Try the second method to correctly align the text.

About the Author

O

Olivia Roberts

A seasoned expert in educational content, Olivia Roberts combines 5 years of experience with a passion for teaching. Olivia's guides are known for their clarity and practical value.

38 articles
View all articles

Rate This Guide

--
Loading...
5
0
4
0
3
0
2
0
1
0

How helpful was this guide? Click to rate: