How to Insert a Line in a Word Header Step by Step

How-to basics · Updated November 21, 2026

To insert a line in a Word header, open the header by double-clicking the top of the page, then choose Insert > Shapes > Lines > Line and drag across the header. Hold Shift as you drag to keep the line horizontal. For a line that automatically spans the header paragraph, use Home > Borders > Bottom Border instead. The shape method gives you more control over length and placement; the border method is usually easier to keep aligned.

These steps are for Word for Microsoft 365 on Windows. The Mac ribbon uses the same basic commands, though some controls may be arranged differently. Before starting, decide whether you want a decorative line beneath header text, a line above it, or a divider that spans the page. That choice helps you select the method and place the line cleanly.

What You’ll Need

  • A document open in Word for Microsoft 365. Save a copy first if you are making substantial changes to an existing document.
  • Access to the page header: double-click the top margin area, or use Insert > Header > Edit Header.
  • A rough idea of the line’s position, length, and appearance. You can refine these after inserting it.

Step-by-Step

  1. Open the header. Double-click near the top edge of a page, inside the header area. Word switches to header editing and displays the Header & Footer tab. You can also select Insert > Header > Edit Header. If the header area is difficult to click, use the ribbon command. A dotted boundary usually marks the header area while it is being edited.
  2. Choose between a drawn line and a paragraph border. Use a drawn line if you need a particular length, want to position it independently, or plan to style it as a graphic. Use a bottom border if the line should sit below header text and extend across the paragraph area. The border option is often the simplest way to create a consistent divider across pages. You can use either method with an empty header or with a header that already contains text.
  3. Insert a drawn line. Click where you want to begin, then choose Insert > Shapes. In the Lines group, choose Line, usually shown as a simple diagonal line. The pointer changes to a crosshair. Click and drag from the starting point to the endpoint. Hold Shift while dragging to constrain the line to horizontal or vertical movement; release the mouse button before releasing Shift. If you want a line beneath a title or name, start below the text rather than dragging through the letters.
  4. Set the line’s length and position. Select the line if it is no longer selected, then drag an endpoint to adjust its length or angle. Drag the middle of the line to move the whole object. Use the page margins and ruler as visual guides. To make the line span the usable text width, align its endpoints with the left and right text margins rather than with the paper edges. Avoid placing it right on the header boundary, where it may look cramped or be hard to select later.
  5. Format the line. With the line selected, open the Shape Format tab. Select Shape Outline to choose a color, then Shape Outline > Weight to choose a thickness. A thin, dark gray or black line is a restrained choice for formal documents; a color can match a logo or heading in a branded document. Use Shape Outline > Dashes if you want a dashed or dotted style. These options affect the selected shape, not the text or the header paragraph.
  6. Use a bottom border instead, if appropriate. Click in the header paragraph that should have the line beneath it. On the Home tab, open the Borders menu in the Paragraph group and choose Bottom Border. If you do not see the menu, look for the small arrow beside the borders icon. Word applies a border to the paragraph, generally across the paragraph’s text area. To remove it, place the cursor in that paragraph again and choose No Border from the same menu. Avoid selecting a line shape by mistake: the paragraph border is controlled from Home, not Shape Format.
  7. Check how it sits with the header content. If the line overlaps text, move it or put it on a separate blank line in the header. With a shape selected, use the layout options button or the Shape Format tab’s Wrap Text menu to adjust how it interacts with text. A shape can be harder to select when it sits behind text, so choose a placement and wrapping option that leaves it accessible. For a simple divider directly beneath one paragraph, a bottom border avoids most shape-wrapping issues.
  8. Close the header and inspect the pages. Select Close Header and Footer on the Header & Footer tab, or double-click in the document body. Scroll through several pages to confirm the line appears where expected and does not collide with the page text. Word normally repeats a header, and a line inside it repeats too. If the line appears on the wrong pages, check the document’s section and header settings before moving or deleting it.

On Word for Mac, double-click the header area to edit it, then use Insert > Shapes to add a line. Select the line to reveal shape-formatting controls, and look for Shape Format or the corresponding outline and weight options. For a paragraph border, use Home and open the Borders control. Ribbon labels and their locations can vary slightly with the Word version and window width, but the shape and border approaches work the same way.

Common Mistakes

  • Drawing on the page instead of in the header. If you insert a line after clicking in the document body, it may appear only on that page and move with the body text. Reopen the header and make sure the header area is active before inserting the shape.
  • Using a hyphen or underscore row as a divider. Typed characters can wrap, vary in length, or turn into an automatic border. A shape or paragraph border is easier to control and edit.
  • Dragging at a slight angle. A line that looks nearly horizontal may appear crooked when printed. Hold Shift while drawing, then check its alignment at normal page size.
  • Putting the line too close to the header text. A thick line can crowd or cross descenders and make the heading harder to read. Leave a small gap or put the line in a separate header paragraph.
  • Assuming one header setting applies to every page. A document may use different first-page headers, odd and even headers, or separate section headers. A line can be absent from some pages because those pages use a different header, not because the line was inserted incorrectly.
  • Deleting the wrong object. Clicking a paragraph border and clicking a shape are different actions. If selecting the line shows Shape Format, it is a shape; if the cursor is in a paragraph and the line is controlled by Home > Borders, it is a paragraph border.

Tips

  • Use the paragraph-border method for a tidy line beneath a full-width header paragraph. It tracks the paragraph and is less likely to drift if you edit the header text.
  • Choose a shape when the line needs to stop short of the margins, align with a logo, or sit at a custom height. Zoom in while placing it, then zoom out to judge the whole page.
  • Keep the line’s thickness and color consistent with the rest of the document. A subtle divider often looks more professional than a heavy rule.
  • After adding the line, check the first page, a middle page, and the final page. Also inspect pages on both sides of a section break if the document has sections.
  • If you want a different first-page header, open the Header & Footer tab and check Different First Page. You can then add or remove a line in the first-page header separately from the main header.
  • If the document has multiple sections, use the Header & Footer tab’s Link to Previous setting thoughtfully. Linked headers share content with the preceding section; unlinking allows the current section’s header to differ. Be aware that changing a linked header can change the header in other linked sections too.

Troubleshooting

The line does not appear on every page. Check whether the document has section breaks or a different first-page header. Open the header on a page where the line is missing and inspect its settings on the Header & Footer tab. If the page belongs to a new section, compare its Link to Previous setting with the prior section. If Different First Page is enabled, the first page has its own header content. Odd and even pages can also have separate headers when that option is enabled.

The line moves when you edit the header. A drawn line is a shape anchored to text in the header, so editing or deleting the anchor paragraph can affect its position. Select the line and move it to a suitable location, or replace it with a paragraph border if it should follow the text. Avoid deleting the paragraph that holds a shape unless you are prepared to reposition or reinsert the shape.

The line is not perfectly horizontal. Select it and adjust an endpoint, or delete it and draw it again while holding Shift. If the line is difficult to select, click near its center or use the Selection Pane if available from the Home tab’s Select menu. Check the line at a practical viewing size; extreme zoom can make a small alignment difference appear larger than it is.

The line is too short, too long, or the wrong color. Click the shape and drag an endpoint to change its length. For color or thickness, open Shape Format > Shape Outline and choose the relevant option. If you used a paragraph border, changing the shape outline will have no effect; put the cursor in the bordered paragraph and adjust the border from Home > Borders instead.

The line is behind text or hard to click. Click the line’s visible edge, or use the Selection Pane to select the shape by name. Then open Shape Format > Wrap Text and choose a wrapping option that makes it easier to select. If a line needs to run under header text, move it into the whitespace beneath the text rather than relying on it to pass cleanly through the letters.

The line prints differently from what you see. Check Print Layout view and use File > Print to preview the page. A line very close to the page edge may be outside the printer’s printable area. Move it inward, confirm its color and weight, and preview pages that use different headers before printing the full document.

Frequently Asked Questions

Will the line appear on every page?

Usually, yes. A line placed in a standard header repeats on pages that use that header. Different first-page, odd-and-even, or section-specific headers can have separate content, so check those settings if the line is missing on some pages.

How do I add a line under the header text without drawing a shape?

Click in the header paragraph, then choose Home > Borders > Bottom Border. This adds a paragraph border beneath the text area. Use a shape instead if you need a shorter line or exact independent positioning.

How do I remove a line from a Word header?

For a shape, click the line and press Delete. For a paragraph border, click in the paragraph and select Home > Borders > No Border. If it remains on other pages, check for another section or a separate first-page or odd-and-even header.

Can I make the line thicker or change its color?

Yes. Select a drawn line and use Shape Format > Shape Outline to choose a color or weight. For a paragraph border, open Home > Borders and choose Borders and Shading to adjust its settings where that dialog is available.

Can I put a line in the header on only the first page?

Yes. On the Header & Footer tab, enable Different First Page, then add the line in the first-page header. The first page uses separate header content, so make sure you are editing that header rather than the standard one.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.