HTML is structured with tags like a tree. All tags have a corresponding end tag. Some HTML documents begin with a document type definition, or DOCTYPE, although that is not required. After the DOCTYPE, if there is one, comes the
<html> tag. After that, most documents have a
<head> tag and and a closing tag for it. The space between these is the head. Information that doesn't fit in the body, such as the title, goes there. After the head is the body, surrounded by the
<body> tags. The content goes in the body. Finally, after the body comes the end tag for the
<html> tag. An end tag looks like its corresponding start tag, except there is a backslash after the less than sign.
A template for an HTML document is as follows.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> </head> <body> </body> </html>