To insert a line in Word for the web, choose Insert > Shapes, select a straight line, and drag across the page; hold Shift as you drag to keep it horizontal. For a divider that follows a paragraph instead of a movable shape, use Home > Borders > Bottom Border. The shape method is best for a line you want to position or format, while a paragraph border is usually quicker for separating sections of text.
Before you start, open the document in Word for the web and click where you want the line to appear. You can add either type to an existing document or a new one. The steps below use the Word ribbon in a web browser; button placement may vary slightly if your window is narrow or the ribbon is simplified.
What You’ll Need
- A document open in Word for the web, with editing available. If it opens in viewing mode, switch to editing if you have permission.
- A mouse, trackpad, or other pointing device for drawing a shape. A keyboard is useful for holding Shift and for navigating the ribbon.
- A clear idea of whether you need a movable line or a divider attached to a paragraph. You do not need to install an add-in or download a file.
Step-by-Step
- Place the insertion point. Click in the document near the location where the line should go. If the line will separate two paragraphs, click in the blank paragraph between them, or create a new paragraph by pressing Enter where the divider belongs. For a shape, the click helps establish the location, but you will position the line by dragging it in a later step. Avoid clicking inside a header, footer, or text box unless you specifically want the line there.
- Open the Shapes menu. Select the Insert tab on the ribbon, then choose Shapes. In the menu, find the Lines group and select the basic straight-line option. If the ribbon is condensed, the button may be inside a dropdown or overflow menu; expand the ribbon or widen the browser window to see more commands. Choose a plain line rather than an arrow if you want a simple divider.
- Draw the line on the page. The pointer should change to a drawing cursor. Move it 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 divider across the page, start near the left edge of the text area and drag toward the right edge. The line’s length depends on how far you drag; it does not automatically span the page.
- Keep it level while drawing. Hold Shift while dragging to constrain the line to a straight horizontal or vertical angle. For a horizontal divider, begin with the pointer at the height you want, then drag sideways while holding Shift. This works with a Windows or Mac keyboard in the browser. If the result is slightly slanted, undo it with Ctrl+Z on Windows or Command+Z on a Mac, then draw again with Shift held down.
- Check its placement and length. Click away from the line to see how it looks in the document. If it is too short, too long, or at the wrong height, select it again. When selection handles appear at its ends, drag an endpoint to adjust the length or drag the line itself to reposition it. Try to keep the line within the document’s text margins so it aligns with the paragraphs above and below.
- Change the line’s appearance if needed. Select the line and look for the contextual Shape or Shape Format tab. Where available, use Shape Outline to choose a color or line weight. A thin neutral line is often easier to read than a thick, brightly colored one. If the formatting controls are not shown in your current Word for the web layout, keep the default line or open the file in the Word desktop app for additional shape-formatting options.
- Use a paragraph border for a text divider instead. Click in the paragraph that should have a line underneath it. Go to Home, find the Paragraph group, open the Borders menu, and choose Bottom Border. If you want a line across the text area rather than only under a short sentence, apply the border to a blank paragraph. The border belongs to that paragraph, so it moves with the text when you edit the document.
- Review the result and save your work. Check the line at the page’s normal reading size and confirm that it separates the correct content. Word for the web saves changes to a cloud-stored document automatically when connected, but wait for the save status to finish before closing the tab. If you are unsure which method you used, click the line: a shape can be selected as an object, while a paragraph border is managed through the paragraph’s Borders menu.
Use a drawn shape when the line needs an exact position, a custom length, or its own appearance. Use a bottom border when the line should stay attached to a paragraph as text is added or removed. For example, a short line beneath a heading that must stay aligned with the heading may suit a paragraph border; a line placed between two columns or beside a callout is more likely to need a shape.
Common Mistakes
- Drawing without holding Shift. A tiny change in pointer height can make the line look crooked. Undo and redraw while holding Shift rather than trying to correct a barely angled line by eye.
- Choosing the wrong line type. A shape is an independent object, not a text character. It may shift when nearby content changes. A paragraph border is tied to a paragraph and may extend across the available text width, which is not the same as a short, freely placed line.
- Applying a border to the wrong paragraph. Bottom Border affects the paragraph containing the insertion point; it does not necessarily underline only the words or sentence you selected. Click in the intended paragraph before choosing the command, and use a blank paragraph if you want a full-width divider.
- Expecting a drawn line to fill the page automatically. A shape is only as long as the distance you drag it. If it needs to align with the text margins, use the page’s text area as a visual guide and resize the endpoints as needed.
- Pressing Enter after typing hyphens and expecting a reliable result. Automatic conversion of typed characters into a rule can depend on Word settings and may not behave the same in every browser or document. Use Shapes or Bottom Border when you need a predictable result.
Tips
- Choose the method based on how the document will change. A border is generally the more stable choice for a divider between sections of flowing text. A shape gives more freedom, but it can overlap text or sit in an awkward spot after substantial editing.
- Make the line easy to see without making it dominant. A fine line in a neutral color works well for most reports and letters. If you use a heavier weight or a strong color, check that it does not compete with headings or other visual elements.
- Keep alignment consistent. Use the left and right text margins as guides, and compare the divider with other lines or headings in the document. A divider that starts noticeably inside the text margin can look accidental unless that inset is intentional.
- Use undo early if a drawing goes wrong. Ctrl+Z on Windows and Command+Z on Mac undo the most recent action. This is often quicker and cleaner than repeatedly dragging endpoints to repair a badly placed shape.
- Think about printing and page breaks. A line near the bottom of a page may end up separated from the section it introduces when the document repaginates. Review the document in print layout or print preview if the final file will be printed or saved as a PDF.
- Remember that web and desktop controls can differ. The same basic approach works in Word for the web on Windows and Mac, but the contextual formatting controls available in the browser may be more limited than in the desktop application. Do not assume a desktop-only formatting option will appear in the browser ribbon.
Troubleshooting
I cannot find Shapes. Make sure the Insert tab is selected, then expand the ribbon if it is collapsed. A narrow browser window can hide commands in a dropdown. If your account or document opens with restricted editing, first switch to editing or ask the document owner for permission. As a quick alternative for a horizontal divider, try Home > Borders > Bottom Border.
The line is not horizontal. Select and delete the shape, then draw it again while holding Shift. Start and finish at approximately the same height; Shift helps constrain the angle, but a careful drag makes positioning easier. Zooming in can help if you need to place the line accurately between nearby text.
The line will not move or resize. Click directly on the line, not in the paragraph beside it. When selected, a shape should show handles or a selection outline. If clicking only places the text cursor, you may have inserted a paragraph border instead. To change a border, place the cursor in its paragraph and open the Borders menu; to remove it, choose No Border if that option is shown.
The line appears in the wrong place or covers text. Select the shape and drag it away from the text, or undo and draw it in a clearer position. If the object is difficult to select because it overlaps other content, click near one of its endpoints. For a simple section divider within normal paragraphs, replacing the shape with a bottom border can avoid object-positioning problems.
The border is too short or appears under the wrong text. A paragraph border follows the paragraph, not the page independently. Click in the correct paragraph and check that it contains the line you want. For a full-width rule, use a blank paragraph and apply Bottom Border there. For a deliberately short line, use a drawn shape instead.
Formatting options are missing. Select the line first; shape-formatting controls appear only when a shape is selected. If the browser version does not offer the weight or color control you need, save the document and open it in the Word desktop app, where more shape-formatting options are available. The exact ribbon layout can vary by account and update, so use the labels displayed in your version rather than looking for a button that is not present.
Frequently Asked Questions
How do I insert a horizontal line quickly in Word for the web?
For a divider attached to a paragraph, place the cursor in the paragraph and choose Home > Borders > Bottom Border. For a movable line, choose Insert > Shapes, select a straight line, and drag across the page while holding Shift.
Can I make the line exactly horizontal?
Yes. Hold Shift as you draw the straight-line shape to constrain its angle. If you use a paragraph’s Bottom Border, the border is horizontal by design and does not need to be drawn by hand.
What is the difference between a line shape and a paragraph border?
A shape is a separate object that you can position and resize independently. A paragraph border is part of the paragraph formatting and moves along with that paragraph. Use a shape for flexible placement and a border for a simple text divider.
How do I remove a line?
Click a drawn shape to select it, then press Delete or Backspace. For a paragraph border, click in the affected paragraph, open Home > Borders, and choose No Border if available. Undo can also remove the line immediately if it was your last action.
Can I change its color or thickness in Word for the web?
Select the shape and check the contextual Shape or Shape Format tab for Shape Outline controls. The options available in Word for the web may be limited compared with the desktop app. Paragraph-border formatting may also offer fewer controls in the browser, so use Word desktop if the exact appearance cannot be set online.
Will the line stay in place if I add more text?
A paragraph border stays attached to its paragraph, making it a good option for text that will be edited. A shape may remain anchored near its original position but can shift relative to surrounding content as the document changes. Recheck the layout after adding or deleting several lines of text.
Related
- How to Compute a Percentage in Google Sheets
- How to Create an Automatic Email Signature in Outlook
- How to Compress Pictures in PowerPoint 365
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Can You Make a Word Document a Fillable Form in Word?Yes. In Microsoft Word for Microsoft 365 on Windows, add content controls from the Developer tab—such as text…
- Mail Merge in Word: A Step-by-Step GuideTo do a mail merge in Word, prepare a recipient list, connect it to a Word document, insert…
- How to Wrap Text in Google Sheets on Desktop and MobileTo wrap text in Google Sheets, select the cell or cells, then choose Format > Wrapping > Wrap.…
- Excel Justify Shortcut: How to Align Text in CellsExcel does not have a dedicated default keyboard shortcut that applies Justify alignment directly to a selected cell.…
- Mail Merge in Word: How It Works and How to Use ItMail merge in Word combines a document template with a list of information—such as names and addresses—to create…
- Copying Text from Excel to Word: Formatting, Links and TablesTo copy cells from Excel into Word, select the cells, press Ctrl+C in Excel, place the cursor in…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.