We present the structural parameters of a complete series of Co 1Ϫx P x (xϭ0.17Ϫ0.26) amorphous alloys as obtained by the analysis of x-ray absorption fine structure measurements. To investigate their correlation with the magnetic properties, we have performed magnetization measurements in the same set of samples, obtaining the concentration dependence of the saturation magnetization, Curie temperature, and the behavior of the low-temperature magnetization. The results for the Co-P system are then compared with the ones of amorphous Fe-P, in order to clarify whether the different structural features found can be used to explain the different behavior of the magnetic properties that these systems exhibit. The evolution of the spontaneous magnetization with the metalloid content is the same for both systems. The Curie temperature decreases appreciably in Co-P, while remaining unchanged in Fe-P. The main result of the structural analysis shows that the bonding distances between metal atoms increases in the Co-P system, whereas they do not change in Fe-P. These magnetic and structural differences are correlated in basis of simple magnetic models.