How to Insert a Line in Microsoft Word Online Easily

How-to basics · Updated November 3, 2026

How to Insert a Line in Microsoft Word Online Easily

To insert a line in Microsoft Word Online, open the document, choose Insert > Shapes, select a line under Lines, then click and drag where you want it. You can adjust its length, position, and appearance after drawing. This method creates a movable line shape; if you only need a divider beneath a paragraph, a paragraph border may be a better choice.

Word Online works in a web browser, so you do not need the desktop Word app. Sign in with the Microsoft account that has access to the document and make sure you can edit it, rather than only view it. The ribbon can look slightly different depending on the window size, but the Insert tab and Shapes command are the controls to look for.

What You’ll Need

  • A browser and internet access, with Word Online open at Microsoft 365.
  • A document you can edit. If it is view-only, ask the owner for editing permission or make an editable copy if that option is available.
  • A mouse or trackpad for drawing the line. A touchscreen can work too, although dragging precisely may take more care.

Step-by-Step

  1. Open the document in editing mode. Go to Word Online and open the file from your recent documents or OneDrive. Check that you can place the text cursor or make another edit. If the document is in Viewing mode, use the mode menu near the upper-right area to switch to Editing, if you have permission. Wait for the document to finish loading before adding a shape.
  2. Choose where the line should go. Click in the document near the intended position. A line shape is an object anchored to the document, not a typed character, so its placement can be affected by the paragraph and page where you create it. If you want a divider between two paragraphs, click in the area between them. You can move the line later, so the first placement does not need to be exact.
  3. Open the Shapes menu. Select Insert on the ribbon, then choose Shapes. In the menu, find the Lines group. The menu may show several line and arrow styles. For a plain divider, choose the basic straight line, usually shown as a simple diagonal stroke. Avoid arrow or connector choices unless you specifically want an arrow or diagram connector.
  4. Draw the line on the page. Move the pointer to the intended starting point, press and hold the mouse button or trackpad, and drag to the endpoint. Release to place the line. For a horizontal divider, drag from left to right across the page; for a vertical line, drag from top to bottom. If the line appears at an angle, undo it with Ctrl+Z on Windows or Command+Z on Mac, then draw it again with a steadier drag. Holding Shift while dragging can help constrain a line to a straight horizontal, vertical, or diagonal direction in many Office versions, but the basic drawing gesture is usually sufficient.
  5. Select the line to edit it. Click the line once. Small handles should appear at its endpoints or around the selected object. If the line is difficult to select, click near its middle rather than on the surrounding text. The selection handles distinguish the shape from a text cursor. If you see a text insertion point instead, click away and try again on the stroke itself.
  6. Set the length and direction. Drag an endpoint handle to lengthen or shorten the line. Move one endpoint up or down to change its angle. To reposition the entire line without changing its length, select the line and drag its middle area to the new location. Move slowly and watch the page as you drag, because a small pointer movement can make a noticeable difference when the line is short.
  7. Change the line’s appearance if needed. With the line selected, look for the contextual Shape or Shape Format controls on the ribbon. Where available, use the outline or line controls to choose a color and weight. A thin, dark line is generally easiest to read as a document divider; use a heavier stroke only when it needs to stand out. The web version may offer fewer shape-formatting choices than desktop Word, so if a particular style control is not shown, keep the default or open the file in the desktop app.
  8. Check the line in the document and let changes sync. Click outside the shape to see how it looks beside the text. Confirm that it is on the intended page, does not cover words, and has the right length. Word Online saves edits to the cloud as you work, but wait until the saving status indicates that changes are up to date before closing the tab, especially if your connection is slow.

Alternative for a simple divider: If the line should span the paragraph width and stay attached to a paragraph, click in that paragraph and look for the Borders menu on the Home tab. Choose a bottom border if that option is available. This creates a paragraph border, not a separate line shape, so it is less convenient to position or resize independently. It can be useful for a clean section break that should follow the text width.

Common Mistakes

  • Choosing an arrow or connector instead of a plain line. The Lines gallery includes different options that can look similar at a small size. Check the icon before selecting it. If the finished object has an arrowhead or behaves like a connector, undo and choose the basic line.
  • Clicking instead of dragging. A single click may not create a visible line, or may place an object with almost no length. Start at one endpoint, keep the mouse button held, drag a visible distance, and then release.
  • Trying to type a line into the text. A shape is not part of the sentence and cannot be edited like a dash or underscore. To change a shape, select it and use its handles. To create a divider tied to a paragraph, use a paragraph border instead.
  • Drawing over text. If you begin the drag through a line of writing, the shape may overlap the words. Undo, then draw in the blank space between paragraphs or choose a paragraph border. After drawing, zoom in enough to check that the stroke does not obscure letters.
  • Expecting the line to stay fixed on the screen. The object belongs to the document, not to a particular spot on your monitor. Editing text before it can shift the line’s anchor or its surrounding content. Check its placement again after making substantial edits nearby.
  • Closing before edits finish syncing. A browser connection can pause or delay saving. Before leaving, check Word’s saving indicator and resolve any connection warning. If you are unsure, wait a moment and reopen the document to confirm the line remains.

Tips

  • Make a divider consistent with the page. For a horizontal rule, draw within the text area rather than all the way to the physical page edge. A line that begins and ends near the paragraph margins usually looks intentional and stays visually aligned with the writing.
  • Use the right tool for the job. Choose a shape when you need to set an exact length, angle, or position. Choose a bottom paragraph border when you want an automatic-width separator that follows the paragraph. Repeatedly typing hyphens or underscores can create uneven results and is harder to format cleanly.
  • Keep the styling restrained. A narrow line in a neutral color works well for most reports, letters, and notes. Thick or brightly colored lines can draw attention away from headings and body text. If the document already uses a visual style, match its existing colors and stroke weights.
  • Use undo rather than fighting a bad placement. If the line is badly angled, too short, or in the wrong place, press Ctrl+Z on Windows or Command+Z on Mac and draw it again. For a small correction, select the line and adjust an endpoint instead.
  • Check the result at normal reading size. A line can look aligned while zoomed in but feel too long or heavy when the whole page is visible. Use the zoom control to inspect both the detail and the page layout before sharing or printing.
  • Remember that browser and desktop controls can differ. Word Online has the core shape-insertion workflow, but some advanced formatting choices may only appear in desktop Word. On a Mac, the browser steps are the same; if you open the file in the Mac desktop app, the ribbon labels and available options can vary slightly.

Troubleshooting

I cannot find Shapes on the Insert tab. First make sure the browser window is wide enough to show the full ribbon. Some commands are grouped under a compact or overflow menu when the window is narrow. Expand the ribbon if it is collapsed, or look for a more-options control in the Insert tab. Also check that you are in Editing mode; view-only access can hide or disable editing commands. If the command remains unavailable, refresh the page after confirming your changes have saved.

The line will not select. Click directly on the thin stroke, not in the nearby paragraph. Zoom in temporarily if needed. If text or another object is covering it, click in a clear part of the line or move surrounding content briefly. Once selected, the handles should appear. If you cannot select it at all, undo the recent action and insert the shape again in a less crowded area.

The line is diagonal when I wanted it horizontal. Select it and adjust the endpoint handles, or undo and redraw it. Begin and end at similar heights, and use Shift while dragging if your version constrains the line direction. If the document is zoomed far out, small pointer movements may be hard to control; zoom in for the drawing, then zoom back out to review.

The line moves when I edit nearby text. Shapes are associated with document content, and changes to nearby paragraphs can affect their position. Try placing the line in a paragraph break where it belongs, then avoid adding or deleting large amounts of text around its anchor without checking the layout. If all you need is a horizontal separator that follows a paragraph, replace the shape with a bottom paragraph border through Home > Borders, where available.

I do not see the formatting controls. Click the shape once to reveal its contextual ribbon controls. If the ribbon is collapsed, expand it. Word Online may not expose every line-style setting found in desktop Word. Try the available outline or weight controls; if you need a specific dash pattern, exact width, or advanced placement, open the document in desktop Word and format the selected line there.

The line disappeared after I closed the document. Reopen the same file and check whether Word finished saving before the tab was closed. Confirm that you opened the correct copy, especially if the document was downloaded or duplicated. If the line is missing, use version history if available to inspect or restore a saved version, or insert it again and wait for the saving indicator to confirm completion.

Frequently Asked Questions

Can I insert a horizontal line in Word Online?
Yes. Use Insert > Shapes, choose the plain line under Lines, and drag from left to right. You can adjust its endpoints after placing it. For a full-width paragraph divider, a bottom border may be simpler.

Can I make the line exactly horizontal?
Drag the line with both endpoints at the same height. If it is slightly slanted, use Shift while dragging if direction constraint is supported, or adjust an endpoint after selecting the shape. Zooming in makes precise placement easier.

How do I change the line’s color or thickness?
Select the line and look for Shape or Shape Format controls on the ribbon. Use the available line or outline options to change its appearance. If the setting you need is missing in Word Online, open the document in desktop Word for more formatting controls.

How do I delete a line?
Click the line so its selection handles appear, then press Delete or Backspace. If you delete text instead, undo immediately, then click directly on the stroke to select the shape before trying again.

What is the difference between a line shape and a paragraph border?
A line shape is an independent object that you can move, resize, and angle. A paragraph border is attached to a paragraph and follows its width and position. Use a shape for custom placement and a border for a simple, consistent divider.

Are the steps different on a Mac?
In Word Online, the ribbon steps are essentially the same in a Mac browser. The common undo shortcut differs: use Command+Z on Mac and Ctrl+Z on Windows. If you switch to the desktop app, some ribbon labels and shape-formatting controls may differ.

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.