you should really be creating a list and .joining it all together at the end to avoid unnecessary string tree churn.    Also, I dislike this trend of shoving html formatting into to_chat and the goonchat window.     There's no telling what it looks like in the fallback window.    This kind of stuff should go into browse windows