Shaped near-infrared (NIR) femtosecond pulses are used for the first time to control the generation of coherent deep-ultraviolet (UV) radiation in an atomic resonance-mediated (2+1) three-photon excitation. The broadband excitation coherently involves pathways that are on resonance with the intermediate resonance state as well as pathways that are near resonance with it. Experimental and theoretical results are presented for phase controlling the total emitted UV yield in atomic sodium. Depending on the NIR spectrum of the excitation pulse, the coherent UV emission is either predominantly due to a single excited real state that is accessed resonantly or due to a manifold of virtual states. The former leads to a narrowband UV emission, while the latter leads to a broadband UV radiation. Basic phase control is exercised in both cases, with excellent agreement between experiments and calculations. The tunability is over an order-of-magnitude UV-yield range.