Non-metallic elements in stars