To display code in a blogger post, you can use the "Preformatted Text" feature. Here's how:
Go to the blogger post editor and click on the "HTML" tab.
Find the place in the post where you want to insert the code.
Type the following code to create a preformatted text block:
Your code goes here
Replace "Your code goes here" with the code you want to display.
Click on the "Compose" tab to switch back to the WYSIWYG editor. You should now see the code block displayed in your post.
Alternatively, you can use a syntax highlighting plugin to display your code in a more visually appealing way. There are several such plugins available online that you can use with blogger.
There are several syntax highlighting plugins available that you can use with Blogger. Here are a few examples:
Highlight.js - This is a popular, open-source syntax highlighting library that can be easily integrated into Blogger. You can find instructions for how to use it here: https://highlightjs.org/usage/
Prism.js - This is another open-source syntax highlighting library that is easy to use and customize. You can find instructions for how to use it with Blogger here: https://prismjs.com/plugins/toolbar/
Google Code Prettify - This is a syntax highlighting library developed by Google that can be used with Blogger. You can find instructions for how to use it here: https://google-developers.appspot.com/web/tools/prettify/
These are just a few examples, and there are many other syntax highlighting plugins available online that you can use with Blogger.