HTML Syntax
Basic syntax rules
HTML code is arranged so that elements are nested.
<html>
<head>
<title>
Example Page
</title>
</head>
<body>
Example Page Contents
</body>
</html>
As you can see from the example, many elements need a closing tag, which is signified by a "/" character. You cannot have two elements crossing each other like this: <b><i></b></i>
Note that browsers always try to render your HTML as well as they can, however sloppy your coding is; but sloppy coding will NOT always look the same in different browsers.
Some elements do not have closing elements e.g. <br /> (line break) and <img /> (image).
Text formatting elements
Here are some commonly used HTML elements which format text:
<b>Bold Text</b>
<i>Italic Text</i>
<s>Strikethrough Text</s>
<u>Underlined Text</u>
<sup>SuperScripts</sup>
<sub>Subscripts</sub>
<tt>Teletype Text</tt>