HTML and CSS Reference
In-Depth Information
The Basic HTML5 Page
Before we get to Canvas, we need to talk a bit about the HTML5 standards that we will be
using to create our web pages.
HTML is the standard language used to construct pages on the World Wide Web. We will not
spend much time on HTML, but it does form the basis of <canvas> , so we cannot skip it en-
A basic HTML page is divided into sections, commonly <head> and <body> . The new
HTML5 specification adds a few new sections, such as <nav> , <article> , <header> , and
<footer> .
The <head> tag usually contains information that will be used by the HTML <body> tags to
create the HTML page. It is a standard convention to put JavaScript functions in the <head> ,
as you will see later when we discuss the <canvas> tag. There might be reasons to put some
JavaScript in the <body> , but we will make every attempt to keep things simple by having all
JavaScript in the <head> .
Basic HTML for a page might look like Example 1-1 .
Example 1-1. A basic HTML page
<!doctype html>
<html lang= "en" >
<meta charset= "UTF-8" >
<title> CH1EX1: Basic Hello World HTML Page </title>
Hello World!
Search WWH ::

Custom Search