@colette, If you want to display code, it is suggested that you use <pre> and <code> tags. Also, try using html entities as well. Im sure there is a reference on this site however, the page i commonly reference is html character entities. You really dont NEED to use code and pre tags, but i believe it is best practice?!
Here is an Example CodePen. If this isn’t what you are after please clarify :)