Confinement is a process by which particles with fractional quantum numbers bind together to form quasiparticles with integer quantum numbers. The constituent particles are confined by an attractive interaction whose strength increases with increasing particle separation and as a consequence, individual particles are not found in isolation. This phenomenon is well known in particle physics where quarks are confined in baryons and mesons. An analogous phenomenon occurs in certain magnetic insulators; weakly coupled chains of spins S=1/2. The collective excitations in these systems is spinons (S=1/2). At low temperatures weak coupling between chains can induce an attractive interaction between pairs of spinons that increases with their separation and thus leads to confinement. In this paper, we employ inelastic neutron scattering to investigate the spinon confinement in the quasi-1D S=1/2 XXZ antiferromagnet SrCo2V2O8. Spinon excitations are observed above TN in quantitative agreement with established theory. Below TN the pairs of spinons are confined and two sequences of meson-like bound states with longitudinal and transverse polarizations are observed. Several theoretical approaches are used to explain the data. A new theoretical technique based on Tangent-space Matrix Product States gives a very complete description of the data and provides good agreement not only with the energies of the bound modes but also with their intensities. We also successfully explained the effect of temperature on the excitations including the experimentally observed thermally induced resonance between longitudinal modes below TN ,and the transitions between thermally excited spinon states above TN. In summary, our work establishes SrCo2V2O8 as a beautiful paradigm for spinon confinement in a quasi-1D quantum magnet and provides a comprehensive picture of this process.