[eluser]Référencement Google[/eluser]
I would say that when it's time to talk about HTML or user output, it's time to think of a view. That said, we all know it's not always possible to keep PHP 100% free of HTML code, sometimes it happend, but when you can avoid to have that situation, then do it.
As for your example in your first post, I would do that in a view since it is user output related.