The subset of a line that contains two end points is a line segment.
A line segment. The point directly between them is the midpoint.
line
A (part of a) line that has two endpoints is called a line segment. (If there are no endpoints, it is just called a line.)