I think the topic was closed before the issue was dealt with.
I simply replaced your ‘div’ (and the class = etc) with the HTML element ‘code’.
Thereby mixing HTML into the paragraph. It turned the P red (as it ought) and then continued with the rest of the paragraph formatted as it should be. I noticed that your HTML seemed to move the P to the line above the rest of the paragraph.