The Tags

Paragraph Tags

This is a very simple tag: <p>
You need to open it when starting a paragraph, and close it when ending one:

  <p>example</p>
  

Line Break Tags

Note the final slash indicating it’s a solitary tag.
We can play with paragraphs and line breaks like this:

  <p>
  <span style="color:#FF0000"> example </span> <br />
  <span style="color:#3366FF">example2</span>
</p>
  

This will simply write:

  example
example2
  

Alignment Tags

We can include an alignment attribute in the paragraph tag.
This is the align attribute. It allows placing text either on the left side of the page (left value), on the right (right value), or centered (center value).
Example:

  <p align="right">example</p>
  

Importance Tags

We can emphasize a paragraph more.
For this, we’ll use the <hx> tags where x represents a natural integer between 1 and 6.

These tag families modify the importance given to elements between the opening and closing tags. The closer to 1, the more important the text. And conversely if we move away from it:

  <p> <h1> example </h1> </p>
  

Italic, Bold and Underlining

To put text in italic, use this tag:

  <em></em>
  

To make it bold, use:

  <strong></strong>
  

While for underlining, use:

  <u></u>
  

Subscripts and Superscripts

For superscripts, use this tag:

  <sup></sup>
  

While for subscripts, use:

  <sub></sub>
  

BlockQuote

To insert text with a slight margin on the right, you can use this tag. There isn’t much to say about it, except that it’s possible to nest several inside each other:

  <blockquote></blockquote>
  

Acronym Tags

An acronym is an abbreviation like C.A.F., C.E.O., etc…
To keep track, we can offer our visitors the translation of these without cluttering the page.
For this, simply use the <acronym> tag.
It takes the meaning of this acronym as a title argument.
Example:

  the <acronym title="National Railway Company"> SNCF </acronym>
  

This will display “the SNCF”. If the internet user places their mouse cursor over it, a small bubble appears displaying the meaning of this acronym.

Font Tags

There are many fonts around the world.
The Internet user doesn’t have all of them by default.
If they don’t have the font used, well, it will be the default font, defined by the browser, that will be used. Not great for aesthetics… So be careful not to choose too exotic fonts.

  <font face="Name of font to use"> the text </font>
  

You can also modify the size of the font used, thanks to the size argument. This takes natural integers between 1 and 7 as values.

  <font face="Name of font to use" size="5"> the text </font>
  

Summary of Basic Tags

TagDescriptionExample
<i>to italicizetest
<b>to boldtest
<u>to underlinetest
<small>to decrease character sizetest
<big>to increase character sizetest
<sub>to subscripttest
<sup>to superscripttest
<tt>for fixed-width fonttest
<s>to strikethroughtest
<strike>same as abovetest

Last updated 04 Sep 2007, 22:41 CEST. history