To display code snippets on your Google Site, follow these steps:
How to?
Insert a Text Box:
Navigate to the page where you want to add your code.
Click on the “Insert” panel and select Text box to create a new text area.
Enter Your Code:
Type or paste your code into the text box. Make sure to select the entire code snippet that you want to format.
Access Text Formatting Options:
With the code selected, click on the three dots (•••) in the text formatting toolbar to reveal additional options.
Select the Code Option:
From the dropdown menu, click on “Code” to format your text as a code block. This will enhance readability and distinguish your code from regular text.