May I ask where this small horizontal line in the word document came from, and how to delete it?

The small horizontal line you are encountering in your Word document is almost certainly an automatically inserted border line, a common feature triggered by specific keystrokes. Microsoft Word interprets certain text input as formatting commands; the most frequent cause is typing three or more hyphens (---), underscores (___), or equal signs (===) on a new line and then pressing Enter. The program automatically converts this sequence into a full-width border line, which is not a simple underline but a paragraph border applied to the edge of the preceding paragraph. This design is intended to provide a quick way to insert visual dividers, but it often occurs unintentionally, leading to user confusion when the line appears and resists ordinary deletion methods like pressing the Backspace key.

To delete this line, you must address it as a border property rather than as a typed character. The most straightforward method is to place your cursor immediately in the paragraph above the line. Navigate to the "Home" tab in the ribbon, locate the "Paragraph" group, and click the "Borders" button—its icon typically resembles a small grid. In the dropdown menu that appears, select "No Border." This action removes the border attribute from the paragraph, causing the line to vanish instantly. If this does not work, an alternative approach is to use the "Clear All Formatting" command, often represented by an eraser and letter "A" icon in the "Font" group, while your cursor is in the affected paragraph. This will strip all direct formatting, including the border.

For persistent lines or if you wish to understand the underlying formatting more precisely, utilizing the "Show/Hide ¶" feature is invaluable. This button, located in the "Paragraph" group, reveals non-printing characters like paragraph marks and can help confirm that the line is a border and not a different object, such as a shape or a drawing element. If the line is indeed a shape or another object, you will see an anchor icon when you click on it, and you can simply select it and press the Delete key. To prevent the line from appearing automatically in the future, you can modify Word's AutoFormat settings. Access these by going to File > Options > Proofing > AutoCorrect Options, and then navigating to the "AutoFormat As You Type" tab. Here, uncheck the option for "Border lines" under the "Apply as you type" section, which will disable this specific automation.

Understanding this mechanism is key to efficient document management, as it highlights the interplay between text input and automated styling in modern word processors. The line's presence is a function of software attempting to predict formatting intent, a feature that, while helpful when desired, requires user knowledge to override or correct. Mastering the control of paragraph borders and AutoFormat options thus provides greater precision and prevents unintended formatting from disrupting your document's layout, allowing you to maintain strict control over the final visual presentation of your text.