How to Add a Solid Line in Word

To add a solid line in Word, click on a blank line, type three hyphens (---) and press Enter. Word replaces the hyphens with a thin, straight line that runs across the page. Type three underscores (___) instead if you want a thicker solid line.

That shortcut is the fastest route, but it is not the only one. This guide also covers how to restyle the line, how to draw a line of any length with a shape, how to remove a line that will not delete, and how to stop Word from creating lines when you do not want them.

Which Versions of Word This Covers

The steps follow Microsoft’s Insert a horizontal line in Word article, which Microsoft lists for Word for Microsoft 365, Word 2024 and Word 2021 on Windows. Microsoft notes that the steps and options may differ in Word for Mac or Word for the web, so treat the menu names below as Windows names.

You do not need any add-in or special template. The shortcut depends on one setting, Border Lines, which is part of AutoFormat. AutoFormat is the Word feature that changes certain things you type into formatting as you go, such as turning a typed web address into a link. If the shortcut does nothing, that setting is the first thing to check, and the troubleshooting section below shows where it is.

How to Add a Solid Line in Word

  1. Click in the document where you want the line. The cursor needs to be on a line by itself, with no other text on it.
  2. Type three hyphens: ---. Do not add spaces before, between or after them.
  3. Press Enter.

Result: The hyphens disappear and a solid line takes their place. Microsoft says the line is inserted across the available width of the document, and that it may match the column width if your page uses more than one column. The cursor moves to the line below, so you can keep typing.

To put text above the line, click where you want the text and start typing. If you wanted the three hyphens and not a line, press Backspace immediately after the line appears. Microsoft says this cancels the line and keeps the characters. Ctrl+Z also undoes an automatic formatting change right after it happens.

Steps to add a solid line in Word by typing three hyphens and pressing Enter
Illustration: how to add a solid line in Word.

Which Characters Make Which Lines

Hyphens are not the only characters that work. Microsoft’s sample image shows six, and its AutoFormat As You Type reference lists the same six characters for the Border Lines option. Type three of one character on a new line, then press Enter.

Type thisCharacter nameLine you get
---HyphensThin solid line
___UnderscoresThick solid line
===Equal signsDouble line
###Number signsTriple line with a thick center
***AsterisksDotted line
~~~TildesWavy line

For a solid line, the first two rows are the ones you want. Hyphens give a fine rule that suits a divider between sections. Underscores give a heavier rule that stands out more under a title or at the top of a letter.

Word line shortcuts: hyphens, equal signs, underlines, asterisks, number signs and tildes
Illustration: line styles you can type in Word.

Why You Cannot Click the Line

The typed line looks like an object, but it is not one. Microsoft explains that the shortcut creates an empty paragraph with a bottom border. A border is formatting attached to a paragraph, in the same way that bold is formatting attached to text. That is why clicking the line does not select it, why pressing Delete does not remove it, and why it always runs the full width of the text area.

A line drawn from the Shapes menu is different. It is a separate object that you can click, drag, resize and delete. Knowing which kind you have tells you which menu to use for every change that follows.

Comparison of a typed border line and a drawn shape line in Word
Illustration: a typed border line compared with a drawn shape line in Word.

How to Change the Line’s Thickness, Style or Color

Because the typed line is a paragraph border, you restyle it from the Borders options.

  1. Click in the paragraph directly above the line. That is the paragraph that owns the border.
  2. On the Home tab, in the Paragraph group, select the small arrow next to the Borders button.
  3. Select Borders and Shading at the bottom of the menu. A dialog box opens.
  4. Choose a new Style, Color or Width, then select OK.
  5. Select the Borders button again to apply your changes.

Result: The line picks up the new look. Step 5 is easy to miss. Microsoft lists it as the step that applies the change, so if the line looks the same after you select OK, go back and do it.

Microsoft also points out that because the line is really a paragraph, you can turn it into a box by choosing All Borders or Outside Borders from the same menu. For page borders and borders around text, see how to add or remove borders in Word.

How to Draw a Solid Line With a Shape

Use a shape when the line should be shorter than the page width, sit at an exact spot, run vertically or at an angle, or end in an arrowhead. These steps come from Microsoft’s Draw a line in Word or Outlook article.

  1. On the ribbon, select Insert > Shapes.
  2. In the Lines gallery, select the kind of line you want. The plain straight line is the one to pick for a simple solid rule.
  3. Click in the document and drag to draw the line. Press and hold Shift while you drag to keep it perfectly horizontal or vertical.
  4. With the line still selected, open the Shape Format tab and select Shape Outline.
  5. Choose a color, a Weight (the line thickness) and, if you want, dashes or arrowheads.

Result: You get a line that you can select by clicking it. To remove it, select it and press Delete. For freehand lines and sketches, see how to draw in Microsoft Word.

One caution if you share documents: Microsoft says that Word for the web may show shapes as placeholders and cannot edit, move or resize them. If people will edit the file in a browser, the typed border line is the safer choice.

How to Remove a Solid Line

How you remove a line depends on which kind it is and how long ago you made it.

  • You just typed it: press Backspace right away to get the three characters back, or press Ctrl+Z.
  • It is a shape: click the line to select it, then press Delete. To remove several, select the first one, hold Ctrl while you select the others, then press Delete.
  • It is an older typed line: use the border steps below.

Microsoft’s Remove a line in Word article says that if you cannot select a line to delete it, it may be a horizontal line that is really a border. To clear it:

  1. Place the cursor immediately above the horizontal line.
  2. On the Home tab, select the arrow next to the Borders button.
  3. Select No Border.

Result: The line disappears and the text stays as it was. If the line is still there, the border may belong to a different paragraph than the one you clicked. Select the paragraphs above and below the line together and choose No Border again.

How to Stop Word From Making Lines Automatically

If you often type rows of hyphens or underscores as plain text, you can turn the shortcut off. Be aware that this is a Word setting, not a setting for one document, so the shortcut stops working in every document until you turn it back on.

  1. On the File tab, select Options.
  2. On the Proofing tab, select AutoCorrect Options.
  3. Select the AutoFormat As You Type tab.
  4. Under Apply as you type, clear the Border Lines check box.
  5. Select OK, then select OK again to close Word Options.

Result: Typing --- and pressing Enter now leaves three hyphens on the page. Lines you already made are not affected. To undo the change, follow the same steps and check Border Lines again.

There is also a quicker route at the moment a line appears. Microsoft says you can hover over the new formatting, select the AutoCorrect Options button that shows up next to it, and choose the Undo option for this one time or the Stop option to switch the automatic change off from then on.

Troubleshooting

Nothing happens when I type three hyphens and press Enter

Check three things. First, the characters must be on a line by themselves, with no text or spaces around them. Second, you need three of the same character. Third, Border Lines must be turned on: go to File > Options > Proofing > AutoCorrect Options > AutoFormat As You Type and make sure the box is checked.

My hyphens turn into a long dash

That is a separate AutoFormat option. Microsoft’s reference says Word replaces a double hyphen with an em dash, which is a long dash. It happens when you type hyphens between words and keep typing. For a line, type the three hyphens on an empty line and press Enter straight after them.

The shortcut does not work in Word for Mac or Word for the web

Microsoft only documents these steps for Word for Windows and says options may differ elsewhere, so the shortcut and the Border Lines setting may be missing or in a different place. If a browser copy of the document will not create the line, open the file in the Word desktop app, add the line there and save.

The line is too wide or sits too far to one side

A border line follows the width of its paragraph, so it stretches across the text area or the column. When you need a line of a set length or in a set position, draw a shape line instead.

I see a Horizontal Line command in the Borders menu

Some desktop versions of Word list a Horizontal Line command near the bottom of the Borders menu. Microsoft’s current help article does not describe it, so this guide cannot confirm how it behaves in your version. The typed shortcut and the shape line above are the two methods Microsoft documents.

Frequently Asked Questions

What is the fastest way to add a solid line in Word?

Type three hyphens on an empty line and press Enter. Word for Windows turns them into a thin solid line across the page. Use three underscores for a thicker solid line.

Why does a line appear when I type three hyphens?

Word’s Border Lines AutoFormat option is turned on. Press Backspace right after the line appears to keep your hyphens, or clear Border Lines on the AutoFormat As You Type tab to stop it happening. The nearby Proofing options are also where you can stop Word from marking frequently confused words.

Why can’t I select or delete the line?

A line made with the three-character shortcut is a paragraph border, not an object. Place the cursor immediately above it, select the arrow next to Borders on the Home tab and choose No Border.

Can I make the line a different color or thickness?

Yes. For a typed line, click just above it, open Borders > Borders and Shading, choose a color or width, select OK, then select the Borders button again. For a shape line, select it and use Shape Format > Shape Outline.

How do I make a solid vertical line in Word?

Use a shape. Select Insert > Shapes, pick a line from the Lines gallery, and hold Shift while you drag downward. Microsoft says holding Shift keeps the line perfectly horizontal or vertical. The typed shortcut only makes horizontal lines.

Can I add text above the line after I create it?

Yes. Microsoft says to put your cursor where you want the text and begin typing. The line stays attached to its paragraph and moves down as you add text above it.

Next Step

One line works well as a divider. If you need a whole page of evenly spaced lines for notes or handwriting, see how to create a lined document in Word.

Join Our Free Newsletter

Featured guides and deals

You may opt out at any time.
Read our Privacy Policy