To insert a line in Word for the web, open Insert > Shapes, choose a line, then drag across the page to draw it. For a simple divider that stays attached to a paragraph, use a bottom border instead: place the cursor in the paragraph and choose Home > Borders > Bottom Border. You need a document open in Word in a supported browser; the basic steps work on both Windows and Mac.
What You’ll Need
- A document open in Word for the web, signed in with an account that can edit it. If you only have viewing access, ask the owner for permission or make an editable copy if that option is available.
- A browser window with the Word ribbon visible. The ribbon may be simplified or collapsed, so you might need to expand it or open the relevant tab to see the commands.
- A mouse, trackpad, or other pointing device for drawing a shape. A keyboard is enough for applying a paragraph border.
Step-by-Step
- Open the document and choose where the line belongs. Go to Word for the web and open the file. Click in the document near the intended location. If you are adding a separate drawn line, put the text cursor in the relevant area first so you can see where the object is being added. For a paragraph divider, click in the paragraph that should have the border; you do not usually need to select all of its text.
- Open the Shapes menu. Select the Insert tab on the ribbon, then select Shapes. Find the basic line in the Lines section of the menu and select it. The pointer should change to indicate that Word is ready for you to draw. If you cannot see Shapes, check that the Insert tab is active and expand the ribbon or its overflow menu; a narrow browser window can hide some commands.
- 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. Drag from left to right for a horizontal divider, from top to bottom for a vertical line, or at an angle for a diagonal line. To keep the line level or vertical while drawing, hold Shift as you drag if the browser version permits shape-angle constraints. If it does not, draw slowly and adjust the endpoints afterward.
- Check the position and length. Click the line to select it. If the endpoints or small selection handles are visible, drag an endpoint to shorten, lengthen, or reposition the line. Avoid dragging the middle of the line if you mean to change only its length; dragging the body generally moves the whole shape. Click in the document away from the line when you are finished to see how it looks alongside the text.
- Change the line’s appearance if needed. With the shape selected, look for the contextual Shape or Shape Format tab. Use the line or outline controls, such as Shape Outline, to choose a color, weight, or dash style when those options are available in your Word for the web ribbon. A heavier line is useful for a strong section break; a thin, neutral line is less distracting. If the contextual controls do not appear, click the line once rather than the page text.
- Use a paragraph border for a simple divider instead. Click in the paragraph above which you want the divider, then choose Home > Borders and select Bottom Border. Word draws a border along the bottom of that paragraph, usually across the available text width. This option is often easier for a document section break because the border belongs to the paragraph and moves with it as text changes. The border is not a free-floating line, so you cannot drag its ends to set a custom length.
- Review and save the result. Check that the line does not cross text, sit too close to a heading, or appear on the wrong paragraph. Word for the web generally saves edits to an online document automatically, but wait for the saving indicator to finish before closing the tab. If you are editing a downloaded or shared file, confirm that you have permission to save changes.
Common Mistakes
- Choosing the wrong kind of line. A shape is best when you need a short, positioned, vertical, or diagonal mark. A bottom border is usually best for a full-width horizontal separator that should remain with the paragraph. Picking a shape for a simple divider can create extra positioning work; choosing a border when you need a short accent will not give you control over its endpoints.
- Clicking instead of dragging. Selecting the Line command does not insert a finished line by itself. You still need to press and drag on the page. A click may leave a tiny mark or make it seem as though nothing happened, so draw from a clear starting point and move the pointer before releasing.
- Drawing through the text. A shape can sit over text or other objects, especially when it is placed on top of a busy paragraph. Zoom in if necessary, select the line, and move it into a clear gap. If you want a divider between paragraphs, a paragraph border avoids much of this overlap risk.
- Expecting typed hyphens to work everywhere. In some desktop Word setups, typing repeated hyphens and pressing Enter triggers automatic formatting. That behavior can depend on AutoFormat settings and may not be consistent in Word for the web. Use Shapes or Borders when you need a reliable result rather than relying on that shortcut.
- Changing the whole shape by accident. Dragging the center moves the line; dragging an endpoint adjusts its length or direction. If it jumps unexpectedly, undo once with Ctrl+Z on Windows or Command+Z on Mac, then select it carefully and try again.
Tips
- Use the line that matches the job. Choose a shape for a diagram, a short underline, a margin mark, or a line with a custom angle. Choose a paragraph border for a plain separator between sections. Making this choice first saves time and reduces the chance of a line shifting when you edit nearby text.
- Keep section dividers consistent. If a document already uses a particular line color or thickness, match it. Repeating the same style makes headings and sections easier to scan. For a professional document, a subtle gray or black line is often easier to read than a bright color, unless the color has a specific meaning in the document.
- Use zoom and page layout to place shapes accurately. At a very low zoom level, a small pointer movement can produce a large change in the line’s position. Increase the browser’s document zoom with Word’s zoom control, draw the line, then return to your preferred view. The browser’s own zoom can also change the apparent size of the ribbon and page.
- Remember that a drawn line is an object. It may move as nearby content is edited, and its position can be less predictable than a paragraph border. After adding or deleting text above it, inspect the page again. If the line is decorative and its location matters, finish editing the surrounding text first.
- Keep an undo path available. Word’s undo command can reverse an accidental insertion or formatting change. On Windows use Ctrl+Z; on Mac use Command+Z. If a line is merely selected, pressing Delete removes that selected shape, so check what is selected before using it.
Troubleshooting
I cannot find Shapes on the Insert tab. Make sure the document is open in editing mode, not read-only. Expand the ribbon if it is collapsed, widen the browser window, or check the Insert tab’s overflow menu for commands hidden at the current window size. If you have view-only access, the Shapes command may be unavailable until you obtain edit permission.
I selected Line, but nothing appears. After choosing a line, you must drag on the page to define its start and end points. Try drawing in a blank area first to confirm the tool is active. If the pointer has returned to normal, select Insert > Shapes > Line again and draw without clicking elsewhere in between.
The line is too short, angled, or in the wrong place. Select it and adjust an endpoint rather than redrawing immediately. To move the entire line, drag its middle. If small movements are difficult, zoom in or use a larger browser window. Holding Shift while drawing may constrain the angle; if that is not supported in your current browser session, use the handles and visual alignment instead.
The line disappears behind text or another object. Select the shape and move it into open space, or remove it and add a bottom border to the paragraph. Word for the web may offer fewer advanced arrangement controls than the desktop app, so a paragraph border is a practical fallback when you need a clean horizontal separator rather than a layered graphic.
The border appears under the wrong paragraph or does not look full width. A paragraph border applies to the paragraph containing the insertion point, not necessarily to highlighted words. Click inside the intended paragraph and apply Home > Borders > Bottom Border again. Check paragraph indents and page margins too: they affect where the border begins and ends. If the border was applied to the wrong paragraph, undo it and repeat with the cursor placed correctly.
The line is difficult to select or edit. Click close to the line itself, not on nearby text. If the shape is very thin, zoom in and try again. If it is still awkward to manage, undo the shape and use a paragraph border for a regular divider. Before closing the document, confirm the saving status so your correction is retained.
Frequently Asked Questions
Can I insert a perfectly horizontal line in Word for the web?
Yes. Choose Insert > Shapes, select a line, and drag from left to right. Holding Shift while drawing can help constrain the angle if that behavior is supported in your current browser version. For a page-width divider, a paragraph bottom border is often simpler.
How do I insert a vertical line?
Choose the line shape from Insert > Shapes and drag from top to bottom. Use the selection handles to adjust its height or position. A shape is preferable to a paragraph border for a vertical mark.
Can I make the line shorter than the text width?
Yes, if you insert a shape: drag between the endpoints you want, then adjust an endpoint after selecting it. A paragraph border generally follows the paragraph width and is not designed for a custom short segment.
Why does my line move when I edit the document?
A drawn line is a shape object, and its placement can shift when nearby text or page layout changes. A bottom paragraph border is attached to the paragraph instead, making it a more stable choice for a section divider.
Is Word for the web different on a Mac?
The browser ribbon commands are broadly the same on Mac and Windows. The main shortcut difference is undo: use Command+Z on Mac and Ctrl+Z on Windows. Browser size and account features can affect which ribbon controls are visible.
Can I remove a line after inserting it?
Click a drawn shape to select it and press Delete, or use undo immediately after inserting it. For a paragraph border, place the cursor in the paragraph and use the Borders menu to remove the border; the exact removal choice can vary with the menu shown in your version.
Related
- How to Clear Cache in Outlook 365 on Windows, Mac, and Web
- How to Clear Cache in MS Outlook Without Losing Mail
- Clear Cache in Microsoft Outlook: Windows, Mac & Mobile
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Excel Data Validation List Based on Another Cell ValueYes. In Excel for Microsoft 365 on Windows, select the cell for the dropdown, then choose Data >…
- Excel Dropdown Lists: How to Create and Manage ThemTo create a dropdown list in Excel for Microsoft 365 on Windows, select the cell or cells, go…
- How to Insert a Handwritten Signature in WordTo insert a handwritten signature in Word, save a clear scan or photo of your signature as an…
- Rows Excel Shortcut: Insert, Delete, and Select RowsIn Excel for Microsoft 365 on Windows, select a whole row and press Ctrl+Shift+Plus to insert a new…
- How to Make a Checkbox Green in Google Sheets When CheckedTo make a Google Sheets checkbox cell turn green when checked, select the checkbox range, open Format >…
- Excel Freeze Panes Based on Selection: How It WorksYes. In Excel for Microsoft 365 on Windows, select the cell immediately below the rows and immediately to…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.