A straight line with two ends
A line segment is a straight line that starts at one point and stops at another. Its length is the distance from one end to the other.
To draw a segment 7 cm long, lay the ruler flat and hold it still. Put the tip of the pencil on the 0 mark. Draw along the edge of the ruler, and stop when the pencil reaches the 7 mark. Then mark both ends clearly.
The pencil starts on the 0 mark and stops on the 7 mark. The segment is 7 cm long.
Why the end mark names the length
Each number on the ruler counts the centimeters from 0. So while the pencil moves from 0, the number under its tip is the length drawn so far: at 3 the line is 3 cm long, and at 7 it is 7 cm long. Stopping on the 7 mark gives exactly 7 cm.
This only works because the line started on 0. Start anywhere else, and the number under the pencil no longer says how long the line is.
Started in the wrong place
Suppose the pencil started on the 1 mark by mistake and stopped on the 8 mark. The end of the line reads 8, but the line is not 8 cm long. It covers the spaces from 1 to 8, and 8 − 1 = 7, so it is 7 cm long.
The other way round is a common slip too. Start on the 1 mark and stop on the 7 mark, and the line is only 7 − 1 = 6 cm long, one centimeter short.
This segment starts on the 1 mark and ends on the 8 mark. It is 8 − 1 = 7 cm long.
the right end reads 8 but the object is not 8 long: length = right end − left end = 8 − 1 = 7 cm, wherever it sits
Slide the object back to 0 and read its end
The 7 cm length starts on the 1 mark, so its end reads 8. Slide it back until it starts on 0, and its end reads 7, the length itself.
Check it by measuring
When the segment is drawn, measure it. Put one end on the 0 mark and read the other end. If it reads 7, the segment is 7 cm long. If it does not start on 0, take the start reading from the end reading.