What does m4 bolt size mean?

M4, for example, means the "standard" M4 thread size: for a bolt, the outside of the thread would be 4mm in diameter, and the spacing between threads (the