<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Canvas</title> <!-- <link rel="stylesheet" href="css/style.css"> --> <style> canvas { background: #eee; display: block; margin: 0 auto; } p { width: 800px; margin: 0 auto; } ol { width: 800px; margin: 0 auto; } </style> </head> <body> <section> <h1 align="center">Recursive tree</h1> <p>Reload the page to see another one</p> </section> <canvas id="tree" width="1000" height="750"></canvas> <section> <p align="right">(c) djmil</p> </section> <script src="tree.js"></script> <script> var canvas = document.getElementById("tree"); ctx = canvas.getContext("2d"); tree(ctx, canvas.width/2, canvas.height, 200); </script> </body> </html>