Hi @Whitney
Thank you for the help! The solution was to copy the code from the article you shared directly into the Knowledge Base article. I had some help from a developer who opened my eyes to a multitude of other formatting possibilities which I had until now struggled with in HubSpot.
These links may also prove useful for other people:
https://developers.hubspot.com/docs/cms/hubl#hs_cos_wrapper_widget_2878117828