Skip to main content
Richard Hill - Online Learning
An Introduction to XMLZIPPDF (letter)PDF (A4)e-mail
Main menuSection menuFeedbackPreviousNext
2. Understanding Markup Languages
  


HTML Elements page 4 of 7


Pages for the web written in HTML are constructed from elements, that are defined by tags. We can spot tags by looking for the angle brackets (< and >). Take a look at the code in your browser; the first tag is <HTML>. This is referred to as the root element as all of the other elements are contained within it. Note that the document ends with </HTML>. This is the closing tag.

The containment of tags within the root element is called nesting. If you have experience of programming then you will have seen nested code, which is a block of instructions contained within other code such as a loop.

In other words, nesting describes a relationship between elements whereby the starting tag of a parent element occurs before the starting tag of a child element. Similarly the ending tag of the child element occurs before the ending tag of the parent element.

<parent>

<child>

</child>

</parent>

If we look at 'firstpage.htm', all of the elements are nested within the <HTML> tag. The <TITLE> tag is contained within the <HEAD> tags. Note that the content of the <TITLE> element tag is typed straight in without any formatting. It is the HTML markup that describes the formatting for the browser to interpret.


Main menuSection menuFeedbackPreviousNext
www.shu.ac.uk/schools/cms/teaching/rh1