Hello Jean-Paul,
I think this is a too simplistic view of emission/absorption phenomena.
In my opinion, the example is not well chosen. It seems to show that all stars have a continuous spectrum without absoption/emission lines (that's false) and it seems to explain that all the emission/absorption phenomena is due to nebulae between stars and observers (this is false too). Instead, most of the emission and absorption lines on spectrum are the results of stars atmospheres, winds and accretion disks which is the really neighborhood of stars.
I prefer this kind of picture, less cartoony (as Steve Shore said) :
Regards,
Vincent