How to Justify Text in HTML

How to Justify Text in HTML thumbnail
Justify Text in HTML

Most websites have text that is left justified. If you look at the left side of the text you will find the words are in a straight line going down the page. The right side of the text, however, is often uneven, which is not aesthetically pleasing in some website designs. To create an even line of text on the right side of the page you need to justify the text in HTML.

Things You'll Need

  • HTML Editor or Text Editor
Show More

Instructions

    • 1

      Open the HTML page in an HTML editor. If you don't have access to an HTML editor, open the page in Notepad or another text editor.

    • 2

      Navigate to the text you want to justify.

    • 3

      Add <align="justify"> after the paragraph tag, <p>, at the beginning of the paragraph you want justified.

    • 4

      Create a division tag, <div>, around a group of paragraphs you want justified. Type <div align="justified"> at the beginning of the group of paragraphs and </div> at the end of the group of paragraphs.

    • 5

      Save your work and upload the updated page to your website.

Related Searches:

References

Resources

  • Photo Credit Stockbyte/Stockbyte/Getty Images

Comments

  • fisheswithlegs Nov 08, 2010
    For the div thing in step 4, it should be 'justify' instead of 'justified'. That should work.
  • David Spector Sep 16, 2010
    Doesn't seem to work either for the UL or LI tags of lists. Nesting a DIV doesn't seem to work either. I wish CSS made more sense.

You May Also Like

Related Ads

Featured