HTML and CSS Reference
At this point, let's start building a simple template that you can use to build your
CSS3 examples in. Start by creating a blank HTML file (you can see the finished
template in the example file template.html in the chapter2 code download folder).
The first line you need to add, as always, is the DOCTYPE. The HTML5 DOCTYPE
is a rather shorter proposition than you'll traditionally be used to in HTML 4.01
and earlier. Get ready for it, wait, go!
Well, l l , it? h at wa s e a s y, wa s n' it? i it? ? A s yo u k n o w, it? ra d i it? i o n a l l y D O C T Y P E s h ave b e e n
long shambling strings containing URLs, Klingon words, and other such unmemo-
rables. For example, look at the HTML 4 Strict DOCTYPE:
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01//EN”
Why was it like this? Well, as far as I know the W3C had various interesting
ideas about what DOCTYPEs might empower you and the browser to do. But in
the end all DOCTYPEs really did was to put browsers in standards mode when
rendering a page of markup. The writers of HTML5 recognized this and decided
to whittle down the DOCTYPE to the shortest valid string of characters that would
put browsers in standards mode.
LANGUAGE AND BASIC DOCUMENT OUTLINE
Next, you'll add the basic document outline below the DOCTYPE: