HTML example

There are many instructions that can affect what is seen on the web page when viewed in a web Browser. The instructions are expressed in the HTML code as tags.

Most HTML tags can have attributes that you choose the values for.

For example the attributes and their values in HTML tags can define the colour, size and font for text.

There are agreed HTML standards that are supposed to make HTML tags universally interoperable regardless of browser or computer type. The HTML tags described here generally conform to these standards, however some tags do not function or work differently on different browsers.

HTML tags follow this general format:

<tag attribute="value">Visible text</tag>

The first part of the code shown above tells the browser to start a particular instruction, and the last part with the forward slash / after the opening triangle bracket tells the browser to stop the instruction.

Many tags can include more than one attribute and the attributes can be typed in any order and still work the same.

You can use upper or lower case letters for HTML tags and the attribute names. It is best to decide on one or the other and stick to it, using all lower case is easier read and complies with the xHTML standard for authoring web pages. The attribute value can be upper or lower case, in some instances where the value will be displayed (as in the alt attribute of an image) you will want to use upper and lower case as you would in normal document.

  • If you mistype a tag the browser will ignore it, unless it corresponds to another valid HTML tag!