HTML Text

You will always have text on your website and you must know how to format it correctly, as well as what types of tags are available to identify different types of text (e.g. address).

Text will usually be in a <p> tag which is a paragraph tag, however these tags are also available:

Tag Use
<address> Used to supply contact information, it requires the end tag. Most browsers will render it in italics.
<code> Computer code
<mark> Highlights text
<abbr> Abbreviation
<strong> Strong emphasis (browsers usually render this in bold)
<i> Italic text
<u> Underlined text
<b> Bold text
<q> Inline quotation
<cite> Citation
<kbd> Keyboard phrase
<sub> Used to show formulas (appears at the bottom)
<sup> Used to show formulas (appears at the top)

Example

<mark>This is some highlighted text!</mark>

Output

This is some highlighted text!

Example

Today is the 1<sup>st</sup> of  January 2013

Output

Today is the 1st of January 2013

Below are HTML characters and symbols:

Text Symbol / Meaning
&nbsp; Space
&copy; copyright symbol ©
&quot; Quotation mark “”
&trade; Trade mark symbol
&pound; Pound sign £
&euro; Euro sign €
&amp; The and sign &
&reg; Registration symbol ®
&lt; Less than sign <
&gt; More than sign >

Example

&copy; 2012 thecodingguys.net

Output

© 2012 thecodingguys.net