TCM
UoC crest

Basic HTML Markup

How much HTML do you need to know in order to write a TCM profile? Almost none. And anyway, it is all very simple.

Paragraphs

Paragraphs start with a <p>, and end with a </p>. That is it. Linebreaks in the text, and even blank lines, are ignored.

<p>Here is a paragraph. It has two
sentances.</p>

Subscripts

Not H2O but H2O.

Not H20 but H<sub>2</sub>O.

And similarly for superscripts, <sup>.

Clickable links

Links, called anchors if you wish to remember the abbreviation used, take one of the following forms:

Many TCM members are also members of the <a href="http://www.iop.org/">IoP</a>.

Many TCM members are also members of the IoP.

Many TCM members do <a href="/research/electronic_structure.html">electronic structure</a> research.

Many TCM members are also members do electronic structure research.

There is a page on <a href="advanced.html">advanced profile customisation</a>.

There is a page on advanced profile customisation.

The only potential source of confusion is how much of the URL to put in. The answer is, generally, as little as possible. For remote sites, such as the IoP, one must specifiy the lot. For pages on the same site, it is often best to omit the server. Then if www.tcm changes to web.tcm, none of its pages needs modifying. For pages in the same directory, one simply specifies the final page name, so that if a site reorganisation changes the directory layout such links will probably remain valid.

Line breaks

A line break which is not a paragraph break is a rare example of an isolated tag - one which does not come as an opening and closing pair. It is simply <br/>.

Lists

Lists can be Unnumbered Lists or Ordered Lists. The syntax for the individual List Items is identical.

<ol>
<li>Write Profile Page</li>
<li>Finish First Year Report</li>
<li>Enjoy a second year in <a href="/">TCM</a></li>
</ol>
  1. Write Profile Page
  2. Finish First Year Report
  3. Enjoy a second year in TCM

This example makes the nesting of HTML tags very apparent.

To change the ordered list to an unnumbered list, simply replace the "ol" tags by "ul" tags.

Bold and Italic

Bold and italic. However, strong and emphasised are preferred if they are more appropriate.

<b>Bold</b> and <i>italic</i>. However, <strong>strong</strong> and <em>emphasised</em> are preferred if they are more appropriate.

Special Characters

Some characters are better encoded rather than left raw in HTML files. Very common ones are >, <, £ and ö, which should be written &gt;, &lt;, &pound; and &ouml;.

There is also a non-breaking space, &nbsp;.

One can be brave and write pages in UTF-8, but I still feel that it is safer to stick with 7-bit ASCII if one has just the occasional character which is outside of its range. HTML defines a large range of characters, and web browsers should display them all correctly, no matter which language they are operating in. A full list of such characters can be found on Wikipedia.

ε0∇E=ρ: &epsilon;<sub>0</sub>&nabla;E=&rho;