Ensure line is horizontal?

When using the line tool, what can I do to ensure the line I have drawn is “perfectly” horizontal/perpendicular?

Thank you.

Set the starting point and the press shift while dragging the mouse pointer to the end point. This allows only for four directions of the line: horizontal, vertical, and the exact mean of both in the two obvious variants.
(N-S, W-E, NW-SE, SW-NE)

By the way: You cannot force a previously created line to change to one of the above mentioned preferred directions. The additional ‘Shift’ while editing an existing line preserves its already defined direction.

(You may also consider to define a drawing grid with a reasonable distance between the grid points and choose the ‘Snap to grid’ option.)

Worked a charm, thanks Lupp.
I want to experiment with using the drawing grid, I tried selecting “display grid” from the bottom toolbar/menu (what’s it called again? The same toolbar that you find the line tool) and selecting a part of the page, however no grid appears… how do I make the grid appear?

The toolbar should be the ‘Drawing’ toolbar. On my system it wasn’t configured to contain an icon for to “toggle grid visibility” but I could customise that. Originally I use ‘Options’ > ‘LibreOffice Writer’ > ‘Grid’ for such purposes. Try to find your grid settings (density of points e.g.) there and don’t expect the grid to be very eye-catching. It mostly consists of single pixels in some shade of gray. Easy to miss.