Google Sites Examples




Add to your Google Plus 

Google Sites Examples for Mobile
Mobile Site Version - Google Sites Examples


19. Code


 Prev:
18. Other Text formats
Menu: 
WYSIWYG HTML
 Next:
20. Table

Code Html

Format text using code or code block in Google Sites through the WYSIWYG Format HTML menu.

Code WYSIWYG Menu


Code Html Example

Code Example

BlockQoute Code Example

HTML:
<code>Code Example</code>

Standard Code HTML Code

There is no standard HTML for code text.
The Google Sites style can be recreated using the Inline CSS - style attribute.

<div style="color:#006000;font-family:monospace;border:1px solid lightGrey; padding:0.5em">Recreated Code Style</div>

Google Sites Code HTML Code

Google Sites creates the following for BlockQoute Code HTML, which will only render within Google Sites as it uses an internal class:

<div class="sites-codeblock sites-codesnippet-block"><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; " class="sites-codesnippet-block"></p><code>Block Code Example</code></div>

The Inline CSS style attribute used within the Paragraph text can also be edited, by clicking the <HTML> button in the Menu Bar.

<p style="" >Inline CSS </p>

Inline CSS







Code Html - Live Example

Edit your HTML live here: