Here is a copy-and-paste HTML5 app template that will no doubt evolve. Because it uses CDNs to load jQuery and Bootstrap you can copy and paste it as is. You don’t need to create local directories with them. (Updated to include charset declaraction May 3, 2015)

Copy and paste this HTML5 app template using Bootstrap and jQuery

If you want to bang out a quick HTML5 app that uses Bootstrap and/or jQuery
just copy and paste this code. Normally you’d have to copy several files
to local directories, but that problem is eliminated through the use of
CDNS (cloud services) to fetch the files.

Features

  • Uses Bootstrap for clean styling across browsers
  • Uses jQuery for consistent behavior across browsers
  • Automatically finds latest version of jQuery
  • Robust: Includes checks to ensure jQuery and Bootstrap are present

What to be careful of

  • Because only the latest jQuery is specified, behavior could change subtly
  • Watch for newer versions of Bootstrap and change source accordingly
  • It is possible that either CDN could go out of business, in which case
    you’d have to store jQuery or Bootstrap locally
  • It’s probably better to use local versions of both libraries in production
    so that test results remain consistent

 

 
Download source to HTML5 App Template with Bootstrap and jQuery loaded from CDNs v1.01

 

This Program Clones Itself

 

Here’s a page using Bootstrap and JQuery that clones its own source code, starting with the <head> tag

It uses Bootstrap for cosmetic purposes. Obviously the core code is here:

$('#sourceListing').text( $("html").clone().html() ) ;

Screen shot of the program in action:

This Program Clones Itself