You’ve probably seen documents with content aligned to both the left and right margins on the same line. It looks nice and probably seems like a simple task until you try to do it yourself. While Microsoft Word offers several alignment options, they are absolute. In other words, you can’t assign two alignments to the same paragraph. It makes perfect sense in that context. On the other hand, we see documents with content aligned to both margins quite often, so how is it done? Word uses a special tab.

SEE: Windows, Linux, and Mac commands everyone needs to know (free PDF) (TechRepublic)

In this tutorial, I’ll show you how to set what’s known as a right-aligned tab, which allows you to enter content at the left margin as you normally would, then press tab, and enter more content that magically aligns with the right margin. It’s not difficult, but it isn’t intuitive.

I’m using Microsoft 365 on a Windows 10 64-bit system, but you can use earlier versions of Word. Word for the web supports right-aligned tabs. There’s no demonstration file; you won’t need one.

How to do it the wrong way with tabs in Word

You might try to use both alignment options to content on the same line, but it won’t work. When you select the content at the right margin and click Align Right in the Paragraph group, Word right aligns the entire sentence, or paragraph — it’s a paragraph format.

After failing with the align options, you might resort to tabs and spaces. You enter some content at the left margin and then tab, tab, tab, tab, tab, until you think you’ve got just enough space to enter the text you want aligned to the right margin. To demonstrate what happens, let’s try a quick example:

  1. At the left margin, enter your name.
  2. Tab a few times — it’s guesswork. I pressed tab nine times. Click Show/Hide in the Paragraph group to see tab and paragraph marks. By default, Word positions tabs every half inch.
  3. Near the right margin enter your place of employment.
  4. Press Enter to wrap to the next line and enter your favorite color.
  5. Tab a few times — perhaps 10 this time — and enter your pet’s name (Figure A).

Figure A

Image: Susan Harkins/TechRepublic. There’s no way to perfectly right-align using tabs and guesswork.

Do you see the problem? Left aligned content is easy — it starts at the left margin as you expect. On the other hand, the content near the right margin doesn’t line up easily.

You can add spaces to pad that last tab to push each entry at the right margin right up to the right margin, as shown in Figure B. Doing so will move the entire line to the right, now only the selected content. That’s what I meant when I said alignment options are absolute.

Figure B

Image: Susan Harkins/TechRepublic. Add spaces to pad the last tab.

This isn’t the way to get two different alignments on the same line in a Word document. This routine is tedious, messy and unnecessary.

How to use a right-aligned tab in Word

There’s a much easier way to get what you want, and it’s a tab solution. Specifically, you’ll set up a right-aligned tab at the right margin. When you tab to that position, Word will back your entry into position from the right margin. We can best demonstrate this with a simple example:

  1. Jump down a few lines to a new blank line.
  2. On the Home tab, click the Paragraph group’s dialog launcher.
  3. Click Tabs (near the bottom).
  4. In the resulting dialog, enter the position for the right margin, 6.5, and click Set.
    1. I chose 6.5 because that’s the right margin setting in my document. You’ll want to adjust that setting to always equal the document’s right margin.
  5. In the Alignment section, click Right, as shown in Figure C.
  6. Click OK.

Figure C

Image: Susan Harkins/TechRepublic. Create a right-aligned tab.

Now enter your name, press tab and enter your place of employment as you did before. The tab will position the cursor at position 6.5, the right margin. There are no default tabs every half inch as you usually encounter. As you enter each character, Word pushes it to the left, instead of the right, as you enter them. Figure D shows the results of entering the earlier content with a right-aligned tab. Notice that there’s only one tab between the two entries on both lines.

Figure D

Image: Susan Harkins/TechRepublic. Simply click tab between the two entries.

You can use a right-aligned tab to align content at the left and the right margins just about anywhere in a Word document. That’s because tabs are part of the paragraph formatting. When Word encounters a paragraph mark, Word interprets the following line as a new paragraph.

Consequently, you can enter the content first and then format it with a right-alignment tab. Simply enter the text to the left, press one tab only and then enter the content to the right. Select the line of content and then follow the instructions above. The tab will expand to the margin as a right-aligned tab and right-align the content following the tab.

You can enter the right-aligned tab before or after you enter the content. You’ll never resort to guesswork again.

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays