Google Sites Notes

Google Sites Notes

Introduction

Google Sites has its own peculiarities, so here are some notes for myself to avoid some of the problems that are caused for example by automatic addition of HTML code when saving pages. This page is mostly about editing the HTML source using Google Site's own HTML editor.

Use ... Instead of ...

Empty Lines

Use linebreak inside divisions

<div><br>

</div>

instead of non-breaking space inside divisions

<div>&nbsp;</div>

Text lines/Paragraphs

Use

<div>line 1</div>

<div>line 2</div>

instead of

line 1<br>

line 2<br>

because there is some automatic handling involved with "div-paragraphs" making it easier to edit the page.

Three Spaces Before Text

Use hard-soft-hard spaces combination

&nbsp; &nbsp;

instead of soft-hard-soft spaces combination

&nbsp;

because soft-hard-soft spaces combination is actually two spaces in Google Sites.

Increase Text Size

Use

<span style="font-size:1.1em">text</span>

to increase text size, so the text will be easier to read without the need of using web browser's settings to increase the text on the page every time you read it.

Principles

Span Only Each Section

Use span tag only for one section. If by accident you add a monospace font or something else that triggers Google Sites automatic HTML content addition, then there is less HTML content to fix when you notice the problem maybe months later.

Avoid ...

Copy and Paste Stuff

Avoid copying text and tables and stuff from one section to another, because Google Sites probably adds div tags and other tags. Google Sites may also change the formatting of the text. Instead, try using the HTML editor whenever possible.

Monospace Font (Courier New, etc.)

Avoid using monospace font inside span tags, because Google Sites will probably at some point add style="font-size:1.1em" to every division tag.

Last modified: April 25th, 2012

Author: Tomi Häsä (tomi.hasa@gmail.com)

URL: http://sites.google.com/site/tomihasa/google-sites-notes