With Sandvox you can add Raw HTML objects to a page, and Raw HTML pages (containing no Sandvox-generated content) to a site. For some Raw HTML object ideas, have a look at the "Raw HTML object examples" article.

The ability to use custom HTML code is an advanced ability of Sandvox. If you want to edit raw HTML, we assume that you already have a working knowledge of HTML or wish to obtain one; this page is by no means intended as an HTML tutorial, nor can Karelia provide specific troubleshooting advice related to an individual user's HTML code.

If you want to learn more about HTML before attempting to edit raw HTML in your Sandvox site, we encourage you to visit the following third party sites that specifically address HTML issues:

Before publishing, please be sure to validate any Raw HTML objects.

Code Guidelines

For advice on the correct HTML to use, please see "HTML code guidelines and tips."

Raw HTML object

Raw HTML Objects allow you to manage HTML on part of your page.

To insert a Raw HTML object:

  1. From the "Objects" toolbar item, select "Raw HTML."
  2. Enter your HTML into the editor that appears.
  3. To see the HTML in the Web View, close the editor or click "Update Preview" in the toolbar.

To later edit a Raw HTML object:

  1. Select it.
  2. Use the "Edit → Edit Raw HTML…" menu command.
  3. Edit your HTML.

We advise you to use the "Validate" toolbar item to ensure your HTML adheres to web standards.

Sandvox will do its best to display your HTML in the Web View exactly as it will appear once published. There are some limitations though:

External Resources

If you have "Load data from the Internet" disabled in the Preferences, and your HTML references resources that must be loaded from the internet, loading them will fail within Sandvox. Such resources should appear correctly once published, or you could temporarily turn the preference back on to test.

Invalid HTML

Before displaying the HTML, Sandvox tries to make sure it isn't invalid in such a way that could compromise other editing features. If a problem is detected, Sandvox will instead display this placeholder:

Invalid HTML

This is generally the result of a missing, mismatched, or extra close tag. For example, this is missing </div> at the end:


And this has an extra </div>:


To fix, it's advisable to correct your HTML as the error may cause some web browsers to render the page incorrectly. Sandvox's HTML editor has built-in validation support which can provide detailed information on the problems.

To validate custom HTML:

  1. Open the Raw HTML editor (the "Edit → Edit Raw HTML…" menu)
  2. Click the "Validate" toolbar item

The placeholder only takes effect while editing in Sandvox; the code you enter will always be included exactly as you typed it when the site is published.


The purpose is to clean up the HTML in the object and make it nicely indented and formatted.
This is not appropriate to use when there is PHP or other scripts mixed in with the HTML code since "tidying" the HTML may remove the scripting, leaving only the valid HTML behind.

Raw HTML page

This is a page in which the *entire* contents of the page is managed by you and does not contain any Sandvox-generated content.

To edit the code of Raw HTML page:

  1. Select the page in the site navigator.
  2. From the Edit menu choose "Edit Raw HTML…" Or choose "Edit Text" from the Page Details area.
  3. Edit your code in the window that appears.

The changes are updated in the Web View when you click the "Update Preview" button or close the HTML editing window.

Keywords: raw, html, import, insert, counter, counters, count, page counter, hit, hits, access, accessed, view, viewed, views, visitor, visitors, code, source, coding, hyper, text, hypertext, markup, mark, up, mark-up, language, edit, page, pages, object, objects, web widget, widgets

How can we improve this page? Let us know.