INTRODUCTION
The HTML sandpit provides an easy way to test HTML, CSS and Javascript code. It is written in HTML and inline Javascript. It is not meant to be used to develop complete web pages although it could be used for that purpose.
The sandpit aims to be tiny, minimal, functional and useful.
USER INTERFACE
The sandpit UI is a web browser. It may be placed on a web server or used locally on a file system. The HTML page can be modified to suit the user or web site it is served from. In general the HTML code is not critical.
DESIGN
The web page has two areas: a text area for editing the HTML/CSS/Javascript code and a results area where the code is rendered. The text area is implemented using a HTML TEXTAREA and the result area is an HTML IFRAME.
A button on the page begins the rendering of the code. Using Javascript it creates a new HTML document and writes the code to the page for rendering. A minimal version uses 5 lines of Javascript to perform this function.
USES
* HTML, CSS and Javascript code testing
* CSS debugging
* Learning HTML
LIMITATIONS
The HTML sandpit is not a sandbox - it does not provide an isolated environment for the rendered code. Also some HTML features will not work properly. For example a self-referencing HTML HREF link (such as href="#aLink") to the same page will not work since the test code page is also the main page. There may be a simple way to fix this.
SPECIAL FEATURES
With an additional button and about 4 lines of Javascript the HTML sandpit can render itself in the result area ad infinitum - very cool!