The fastest way to add a line
Open your document and place your cursor where you want the line to appear. Go to the Insert tab at the top of the screen, then click Shapes. Select the straight line tool — it looks like a diagonal line and is usually near the top of the shapes menu. Click and drag on your document to draw the line to the length you want.
If you need the line to be perfectly horizontal or vertical, hold down the Shift key while dragging. This locks the line to a 90-degree angle. Once you release the mouse, the line appears on your page and you can move or resize it by clicking and dragging its endpoints.
This method works in Word for Windows, Word for Mac, and Word Online. The line becomes an object you can format — change its color, thickness, or style — by right-clicking it and selecting Format Shape.
Key Takeaways
- The Insert tab and Shapes menu hold the straight line tool, which you draw by clicking and dragging on your document.
- Hold Shift while dragging to make the line perfectly horizontal or vertical instead of at an angle.
- Right-click a line after drawing it to change its color, thickness, or style through the Format Shape menu.
- A horizontal line across the page can also be created by typing three hyphens (---) or three underscores (___) on a blank line and pressing Enter, which Word converts automatically.
- Lines drawn with the Shapes tool sit on top of text by default, but you can change this by right-clicking and choosing text wrapping options.
Using the automatic line feature
Word has a built-in shortcut that creates a horizontal line without opening the Shapes menu. Type three hyphens (---) or three underscores (___) on a blank line by themselves, then press Enter. Word automatically converts this into a solid horizontal line that spans the width of your page.
This method is faster for straightforward divider lines but gives you less control over appearance. The line is treated as a paragraph border rather than a shape, so you cannot resize it by dragging. If you need to adjust the line later, you can delete it and redraw it, or right-click the line and select Borders and Shading to change its thickness or color.
Controlling line placement and text wrapping
When you draw a line using Shapes, it sits on top of your text by default. If your line is covering words you want to read, right-click the line and look for Wrap Text or Text Wrapping options. Choose Square or Through to let text flow around or behind the line instead of being hidden.
You can also move a line by clicking it and dragging it to a new position. To move it precisely, click the line, then use the arrow keys on your keyboard to nudge it one pixel at a time. This is useful when you need the line to align exactly with text or other elements on the page.
If you want a line to stay in one place and not move when you edit text around it, right-click the line, select More Layout Options, and choose Fix position on page. This anchors the line so it remains where you placed it even if you add or delete text above it.
Changing line color, thickness, and style
Right-click any line you have drawn and select Format Shape or Format Line. A panel opens on the right side of your screen with options for Line Color, Width, and Dash Type. Click Line Color to choose from Word's color palette or pick a custom color that matches your document.
The Width option controls how thick the line appears. Drag the slider or type a specific measurement in points. The Dash Type menu lets you change the line from solid to dotted, dashed, or other patterns. These changes explore when ready, so you can see how each adjustment looks before you close the panel.
Adding lines to tables and sections
If you are working inside a table, the Shapes method still works, but the line may behave differently depending on your table layout. Draw the line as usual, then adjust its text wrapping so it does not interfere with the table cells. For dividing sections of a document, a horizontal line works well at the end of a page or between major headings.
Some users prefer to use a table border instead of a drawn line for section dividers. To do this, create a single-row table with one cell, delete the text inside, then right-click the table and select Borders and Shading. You can remove the top, left, and right borders and keep only the bottom border, creating a clean line effect that stays attached to your content.
Troubleshooting common line problems
If your line disappears when you scroll or print your document, it may be set to a white color or placed behind text. Right-click the line and check the Format Shape panel to confirm the color is visible. If the line is behind text, change the text wrapping to Square or Through so it appears on top.
If you cannot select a line to edit it, it may be grouped with other objects or locked in place. Try clicking directly on the line itself rather than near it. If it still will not select, go to the Home tab, click Find & Replace, then Go To Special to select all objects on the page, then click away to deselect everything except the line you want.
Lines created with the automatic method (three hyphens or underscores) sometimes disappear if you delete the line above or below them. If this happens, straightforward retype the three characters and press Enter again to recreate the line.
Frequently Asked Questions
Can I make a vertical line instead of horizontal?
Yes. Use the Shapes tool to draw a line, then hold Shift while dragging to lock it to a vertical angle. You can also draw any angled line you want by dragging without holding Shift. The automatic method (three hyphens) only creates horizontal lines.
How do I delete a line I no longer need?
Click the line once to select it, then press Delete. If the line was created with the automatic method (three hyphens), select the entire line and delete it like you would delete any text. The line disappears when ready.
Can I copy a line's formatting to another line?
Yes, using the Format Painter tool. Click the line with the formatting you want to copy, then click the Format Painter icon in the Home tab (it looks like a paintbrush). Click the line you want to explore that formatting to. The color, thickness, and style transfer to the second line.
What is the difference between a line and a border?
A line is a shape object you draw and position anywhere on the page. A border is a frame around text, a paragraph, or a table. Borders are part of the text formatting, while lines are separate objects. Use lines for decorative dividers and borders for framing content.
Why does my line look different when I print it?
Print preview sometimes shows lines thinner or thicker than they appear on screen. Open Print Preview (Ctrl+P or Cmd+P) to see how the line will actually look when printed. If it does not match what you want, adjust the width in Format Shape and check the preview again.