How to Justify Text in HTML

Techwalla may earn compensation through affiliate links in this story. Learn more about our affiliate and product review process here.

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.


Step 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.

Video of the Day

Step 2

Navigate to the text you want to justify.

Step 3

Add <align="justify"> after the paragraph tag,

, at the beginning of the paragraph you want justified.


Step 4

Create a division tag,

, around a group of paragraphs you want justified. Type
at the beginning of the group of paragraphs and
at the end of the group of paragraphs.


Step 5

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




Report an Issue

screenshot of the current page

Screenshot loading...