-
Book Overview & Buying
-
Table Of Contents
Processing 2: Creative Programming Cookbook
Now that you know how the JAVASCRIPT mode works, it's time to create your own HTML template. This is really handy if you want to take full control of the layout of the web page before showing it on the Internet. The standard HTML might be handy for testing, but it may not be the best way to display your art.
For our template, we'll use the HTML5 Reset Stylesheet made by Richard Clark. This CSS file will reset margins, paddings, and some other CSS properties, to ensure that you'll have a blank slate to start building your own CSS file. This is a good practice to make sure your website looks the same in every browser. This CSS file can be found at http://html5doctor.com/html-5-reset-stylesheet/.
I won't show you any Processing code in this recipe. You can use the code from the previous recipe. We'll take a look at the HTML and CSS codes we need to create a custom template that you can use for your sketches. To create a new template...
Change the font size
Change margin width
Change background colour