You can place your order for this powerful new learning tool at any time. Simply select the link below, fill in the appropriate shipping information, and pay using PayPal. Your book-on-DVD will be shipped to you by Canada Post as quickly as possible.

Order and Shipping

Section 1: Your first HTML (Web) page

To start it is important you understand HTML page, html page and web page all mean the same thing. We can add XHTML to this list as well. All of these names are simply human names for any file whose name ends with .html (or the less common .htm). A web browser (IE, Firefox, Safari, Opera, etc.,) will try to read and open any file whose name ends with .html or .htm. An html file is a plain text file whose name ends with .html or .htm. There is nothing in an html file that cannot be typed from a standard keyboard.

An html file consists of two major parts: a head and a body. The head contains information that does not appear directly in a browser window. The body contains instructions for everything that is supposed to appear in a browser window.

HTML element

HEAD element

Every html document is required to have a title. It is the first thing that a potential user or customer of your site will learn about your site. If your pages are going to be part of a public site you should be careful what you put in the title. If you work through the exercises in this book, I suggest each page have a title that shows what part of the book it came from: perhaps the number of the chapter and section and perhaps a number to indicate which file you are working on (something like chap03file08 or Chap_3file_8).

Other elements

An html file, a web page, has a pair of codes that are used to open and close the file. In addition we need code at the beginning of the file to tell the browser (and other tools, like a code validator) what set of rules, what standard, was used to write the file. That information is provided to you in the templates available in the Chapter 1 folder of this book. (The file is called StrictTemplate.html This file should work well with any browser. As explained in the prep01.txt file, Internet Explorer, at least to version 7, does not work as a browser should with standard XHTML Strict files. There is a second template that is a standard XHTML Strict file which will work with all browsers including Internet Explorer. You can use either one or both in your work. Internet Explorer 8 is much more compliant with XHTML and CSS.

You can open either or both templates in a text editor or in a browser. If you open the template file in a browser, then select View | Source in the browser to look at the code. Or look at this copy of the Strict Template file.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />

<title>Title</title>

<link type="text/css" href="../template.css" rel="stylesheet" media="screen"/>

</head>

<body>

<p>Put your text in paragraphs like this one.</p>

</body>

</html>

You will know a lot more about this information in a lesson or two than you do right now. Probably right now it looks a little strange.

  1. Remember that everything that is in an html file can be typed from a standard keyboard.
  2. Look for pieces of information that start with an angle bracket < ("less than" sign) and end with an angle bracket > ("greater than" sign). All of those pieces of information are html codes.
  3. Notice most of the html codes occur in pairs. There is one code that is <code word> and another that is </code word>. The "<...>" marks the start of an instruction, the "</...>", the one with the forward slash, marks the end of an instruction.
  4. Most elements have a start and a stop, a beginning and an end. Codes that always occur in pairs with information in between the pair of codes are called "container codes" or "container elements" (they contain information). Every container code starts with one that looks like <...> and ends with one that looks like </...>.
  5. The first code in the file is the one that starts <!DOCTYPE. Every web page must have one. The DOCTYPE declaration tells the browser what standard was used to write the code on the page. In this case it was the xhtml11-strict.dtd: the XHTML version 1.0 Strict document type.
  6. At least two other elements in the head are not paired. Any element that does not have a closing partner, any element that is not a container element, is called either an "empty" element or a "self-closing" element. Notice that both the meta element and the link element end with />. Empty elements all have the same basic structure and all must be closed as you will learn in Chapter 3.

You can place your order for this powerful new learning tool at any time. Simply select the link below, fill in the appropriate shipping information, and pay using PayPal. Your book-on-DVD will be shipped to you by Canada Post as quickly as possible.

Order 1 copy of Web pages by the rulesPrice: $25
includes PST+GST / HST, Shipping and Handling