of a Website

2. The Code

A web page is a code document which is interpreted by a browser to take its readable form. To the right is the code for a simple page, and below it the result in a browser window.

Lines 1-3: the doctype statement lets the browser know what rules it should follow when presenting the page.

Lines 4-9: The Head section contains info which is not visible on the page (except for the title), but which helps search engines catalogue the page. It can also include software routines to add functionality to the page.

Lines 11-19: The Body contains the visible content. In this example there is a header, a layer to contain text, an image, some text in paragraphs, and a navigation link.

To learn about the visible parts of a web page, see "The Visible Page". For more info, follow the hotlinks in the right column of this page.

an image showing the code for a simple web page and what it looks like in a browser