To insert a long horizontal line in Word, type three hyphens on an otherwise empty line and press Enter; Word will usually turn them into a line across the text area. For more control, add a paragraph border or draw a line shape. These methods make different kinds of lines, so choose based on whether you want a line that flows with your text or one you can position and resize.
What You’ll Need
- Microsoft Word and the document where you want the line. The steps below are for Word for Microsoft 365 on Windows; Mac notes are included where the controls differ.
- A rough idea of the line’s purpose: a divider between sections, a writing line, or a graphic you will position precisely. You do not need an add-in or a special font.
Step-by-Step
-
Make a quick, full-width line with AutoFormat. Click at the start of a blank paragraph where you want the divider. Type three hyphens in a row using
---, then press Enter. In many Word desktop installations, the hyphens are replaced by a thin horizontal border beneath the paragraph. It generally runs from the left to the right text margin, rather than stopping at the cursor position.To make the line stand out, Word may also recognize other repeated characters, such as three underscores for a heavier line or three equal signs for a double line. The exact result depends on AutoFormat settings. If Word leaves the characters as typed, do not keep adding more hyphens; use the border or shape method below, or turn on the border-line AutoFormat option in the troubleshooting section.
-
Add a line with a paragraph border. Click in the paragraph that should have the line. To keep the rule separate from nearby text, make a blank paragraph first by pressing Enter where the divider belongs, then click in that blank paragraph. On Windows, go to Home > Paragraph > Borders, using the arrow beside the Borders button to open its menu. Choose Bottom Border. Word draws a line across the paragraph area, usually between the text margins.
A paragraph border is often the best choice for a section divider in a report or letter. It stays connected to the paragraph as text is added or moved, so it can travel with the surrounding content instead of floating over it. To change which edge has a line, reopen the Borders menu and choose a different border option. If the line seems too close to the text, put it in its own empty paragraph and adjust the paragraph spacing using Home > Paragraph spacing controls.
In Word for Mac, click in the paragraph and use the Home tab’s Borders control in the Paragraph group. Button placement can vary with the ribbon layout; expand the Paragraph controls if you do not see it. Select Bottom Border from the menu.
-
Draw a line you can position and resize. Click where the line should start, then choose Insert > Shapes. In the Lines section, choose the straight-line shape. Click and drag across the page to draw it; hold Shift while dragging to keep it horizontal. Release the mouse button at the desired endpoint. Select the line to show its handles, then drag an endpoint to change its length or position.
Use a shape when the line must stop short of the margins, sit beside an image, or line up with another object. With the line selected, use the Shape Format tab to change its outline color, weight, or dash style. If you cannot see Shape Format, click the line itself rather than the surrounding paragraph. A drawn shape can overlap text and may move differently from a paragraph border, so check its placement after editing nearby content.
In Word for Mac, the equivalent route is Insert > Shapes, then select the straight line under Lines and drag in the document. The shape-formatting tab appears when the line is selected; its name or available controls can differ slightly by Word build.
Common Mistakes
Typing a row of hyphens and expecting a movable object. The AutoFormat method creates a paragraph border, not a string of characters or a shape. It follows paragraph formatting and may span the text area even if you typed only three hyphens. If you need a shorter line with adjustable endpoints, draw a shape instead.
Applying a border to the wrong paragraph. A border belongs to a paragraph. If you click in a paragraph containing text and choose Bottom Border, Word may put the rule under that entire paragraph, which can look like an underline beneath a block of text. Create a separate blank paragraph and apply the border there when you want a stand-alone divider.
Using underscores for a layout that must adapt. Repeating underscore characters can look like a line, but they are text. Their length depends on the font and may wrap or change when the font, margins, or page size changes. Use them only for simple fill-in blanks when that behavior is acceptable; use a border or shape for a consistent divider.
Pressing Backspace in the wrong place to remove a line. A border is not a character, so deleting nearby text may not remove it. Clear the border from its paragraph using the Borders menu. A shape, by contrast, must be selected by its edge and deleted separately.
Tips
Use a paragraph border for a divider that should stretch with the page’s text area and remain associated with the document flow. Use a shape for deliberate placement or a line that is only part of a diagram. A shape can be made longer or shorter by dragging its endpoint; a paragraph border’s length is controlled mainly by paragraph indentation and page margins.
Keep the line visually consistent with the document. A thin black or gray rule is usually less distracting than a thick, brightly colored one. For a shape, select it and adjust the outline weight and color on Shape Format. For a border, use the Borders menu’s line style, color, and width controls if they are available in your Word version, then apply the chosen border to the intended paragraph.
Before adding a decorative line to a long document, consider whether a built-in heading style or a border applied to a heading would be easier to maintain. If you use shapes, check the line again after inserting text, changing page margins, or switching between portrait and landscape orientation. Those changes can affect where a floating object appears.
For a writing blank, consider a bottom border on a paragraph rather than a long run of underscores. It gives you an editable space above the line and is less likely to break awkwardly across fonts or page widths. For several form fields, use a table with borders or tab stops so the labels and lines stay aligned.
Troubleshooting
The three hyphens remain on the page. First press Enter after the hyphens and check that they were typed in a paragraph by themselves. If they still do not convert, the AutoFormat option may be off. On Windows, open File > Options > Proofing > AutoCorrect Options > AutoFormat As You Type, select Border lines, and choose OK. Try the three-hyphen method again in a new blank paragraph. On Mac, look under Word > Settings (or Preferences) > AutoCorrect > AutoFormat As You Type for the border-lines option; labels can vary slightly by release.
The line is too short or too long. If it is a paragraph border, check the paragraph’s left and right indents. A border follows the paragraph width, so indents can shorten it; page margins also limit how far it can extend. If it is a shape, select it and drag one of the endpoint handles. Do not drag the middle handle if you only want to change its length, because that can move the whole line.
The line appears above the text or surrounds the paragraph. You may have chosen Top Border or another border setting. Click inside the affected paragraph, open Home > Paragraph > Borders, and choose No Border to clear it. Then apply Bottom Border to the intended blank paragraph. If you want to preserve other edges of a border arrangement, inspect the menu before clearing all borders.
The line shifts when you edit the page. This is more likely with a shape than a paragraph border. Select the shape and open its layout options to choose how it interacts with text, such as appearing in line with text or using a wrapping arrangement. The exact options depend on the selected object and Word version. If the line is simply a divider, replacing the shape with a paragraph border is often the more stable fix.
You cannot select a shape line. Click near the line’s edge, not on the text above it. If it is difficult to target, use Home > Select > Selection Pane on Windows and select the line from the object list. The Selection Pane is also useful when a line sits behind text or another object.
Frequently Asked Questions
How do I make a line go all the way across the page?
Type --- in a blank paragraph and press Enter, or apply a Bottom Border to a paragraph that spans the text area. The line normally reaches the text margins, not the physical edge of the paper.
How do I insert a long line without it changing the text layout?
Use a paragraph border for a document divider. It does not add a row of typed characters, and it stays attached to its paragraph. A shape can overlap or wrap text depending on its layout settings, so check those settings if you use one.
How do I make the line thicker?
For a shape, select it and change the outline weight on Shape Format. For a paragraph border, open the Borders menu and choose a heavier line weight if offered. You can also try three underscores for an AutoFormat border, if that option is enabled.
How do I delete a horizontal line in Word?
For a paragraph border, click in the paragraph that owns it and choose Home > Paragraph > Borders > No Border. For a shape, click its edge so its handles appear, then press Delete. Ctrl+Z on Windows, or Command+Z on Mac, can undo the line immediately after it is created.
Can I make a line a specific length?
Yes. Draw a line shape and drag its endpoint to the desired position. A paragraph border normally follows the paragraph width; adjust the paragraph indents to change that width, while remembering that the result remains tied to the paragraph.
Related
- What Number Is Column B in Excel? Meaning and Uses
- What Number Column Is U in Excel?
- What Number Column Is Y in Excel? Find Its Position
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Google Sheets Google Translate Language Codes ExplainedIn Google Sheets, the GOOGLETRANSLATE function uses language codes such as en for English and es for Spanish;…
- Break External Links in Excel: Steps and Side EffectsTo break an external workbook link in Microsoft Excel for Microsoft 365 on Windows, save a backup, open…
- Redo in Excel: Shortcuts, Limits, and FixesTo redo an action in Excel for Microsoft 365 on Windows, press Ctrl+Y after undoing it with Ctrl+Z.…
- Excel File Contains Corrupted Data? Ways to Recover ItIf Excel says a file contains corrupted data, it cannot reliably read some part of the workbook, but…
- Track Changes in Microsoft Word: Review and Manage EditsTo use Track Changes in Microsoft Word, open the document, select Review > Track Changes, and edit as…
- Excel Split Print Area Into Two Pages: Page BreaksYes. In Excel for Microsoft 365 on Windows, select the cells to print and choose Page Layout >…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.