Thank you esmi!
That worked perfectly, and in looking at the rest of the file, bloginfo is used repeatedly and get_bloginfo not once. So that makes sense, and I do understand the difference between the two as documented here (first paragraph, last sentence).
But I think I will now go and learn about The Loop because I think I should know when php code will be writing stuff straight to the browser and when it should be returning results for more php code to manipulate.