What Blogger shows is HTML; you can use the
<code> tags as you would in normal HTML.
It's been a while since I last worked with Blogger, but IIRC it has an editor that lets you use HTML directly. Your
<div class="yourClassName"> should work if you put it there, if
yourClassName has been defined properly. Which, in the case of computer programming code, usually assumes a monospaced font, among other preferences.
There are a number of resources that can help you format; I found this one that uses only
<code> to get your code in code formatting.
There is also this old, off-topic question on Stack Overflow that recommends various online resources. Since it's old, you'll have to experiment a little to see what still works.