A well-formed html page will look as follows:
doctype
declaration. This simple form
identifies html5, the latest (and best!) version of html. Previous
versions required much more complex doctype declarations, such as <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
.
Note
that this doctype declaration has no closing tag associated with it. html
tag (with its associated closing tag as the last
instruction). Here I've added some information about the language of the
text (English) found on that page using the
lang attribute;
this is not absolutely necessary but is a good practice.head
section, containing information about the page itself.
The only information I have included is about the character set used to
encode the information on the page. This information is introduced via
the self-closing (i.e. it has a "/" before the closing bracket) meta
tag. If all the text found on the page is written using simple ascii characters
(i.e. "normal" English letters and symbols), then this declaration is
not going to do anything. However, if you have non-ascii characters,
such as the e-acute in my first name, André, and the encoding is not specified,
then my name might be displayed as André (or even worse) instead.head
section, we also have the title
.
If present, it will normally appear in the browser tab.body
contains the information (text, images, etc.) that
we wish the browser to display.Keep your personal notes here. These notes are stored by your browser on your own computer, and will be available from any page on this site. You can choose to use html syntax for formatting.