Common HTML Problems

Problems when writing HTML

header spacer 2

Common problems found in HTML

Problem 2 - The use of the ampersand "&"

You should not use only the ampersand "&" to represent "and" in any text to be displayed in HTML. The ampersand "&" is a special code character used to define different ASCII text characters in HTML or XHTML and your browser may have difficulty with its interpretation. If you want an ampersand "&" to appear in the text, use the HTML character code "&" (don't forget the semi-colon at the end of "&") which will be interpreted correctly by any browser as the ampersand "&" and the browser will display only the ampersand. Browsers are currently ignoring the error, but will start giving your readers an error message in the future.


Problem 3 - The use of the <font> element

The use of the <font> element is being deleted and soon will give browsers an error on your page content. Use the "<span>" or "<p>" element in place of the deprecated "font" element in your code or add the style in your CSS. For example:

Instead of:
<font color="#ffffff" size="2">

Write:
<span style="color:#ffffff; font-size:14px">

or
<p style="color:#ffffff; font-size:14px">

or in CSS, write a style class to be called from the CSS file.
.fontstyle {
   color:#900;
   font-size:14px;
}


Then use the class attribute in your HTML, such as:
<span class="fontstyle">
<p class="fontstyle">
<tr class="fontstyle">
<td class="fontstyle">

Using class definitions in your CSS file will save a lot of redundant typing in your HTML.


Previous Page Next Page