Tutorial Pages

Basic webpage

The basic html code to create a basic page looks like in this source code:

<!DOCTYPE html>

<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Untitled 1</title>




Over the next few weeks, we shall be developing this further to demonstrate how each of the html approved tags and CSS code can be used to style our basic web page.

<!DOCTYPE html>:
The first line of any html or xhtml document must declare a valid doctype. Doctypes defines which version of HTML (or xhtml) your document is using, and this is a critical piece of information needed by some tools processing the document e.g search engines.

There is not just one type of HTML. There are actiully many. Typical types are:

  • HTML 4.01 Strict
  • HTML 4.01 Transitional
  • HTML 5.0
  • XHTML 1.0 Strict

and of course, many more.

The full list of doctypes is at w3.org. In my example above, I have used the doctype recommended in html5 and because it is backwards compatible everybody should start using it.

<html>: this tells the webbrowser that this is an HTML document and should be read as a web page.

<title>Untitled 1</title>
This tells the browser to display the title of the page in the browser’s title bar.