Some cookies are necessary to make this site and our content available to you. Other Cookies enable us to analyse and measure audience and traffic to the site. Cookies are also used by us, advertisers, ad-tech providers and others to develop and serve ads that are more relevant to your interests. To consent to the use of Cookies and proceed to the site, click Accept below. If you wish to withdraw consent later you will find a link in the footer Cookie Choices. For more information: Privacy Policy.
Common Coding Mistakes

Main | FAQ | Coding Tips | HTML Tutorial | Common Mistakes | Error Explanations | HTML Neoboard Help

Here are some of the usual pitfalls encountered when trying to write properly formatted code.

Error
font-color=green
Should be
font color="green" if inside of HTML tags

color:green if inside of a stylesheet.

Error
You use font-family="monospace" and you get the error message:

Invalid word: family

Should be
font face="monospace" if inside of HTML tags

font-family:monospace; if inside of a stylesheet.

Error
Font family names listed as invalid.

The usual code syntax that causes the error:

font face=verdana helvetica arial.

Should be
font face="verdana helvetica arial"

Note the quotes that enclose the list of font names.

Error
I added quotes and now it doesn't work!

bgsound src="http://url.com/file.mp3" loop="infinite autostart=true"

Another example:

td align="center valign=middle"

Should be
bgsound src="http://url.com/file.mp3" loop="infinite" autostart="true"

Also, do not use img with bgsound otherwise you will get an error message saying you can't use img that way.

Rule of thumb: do not have quotes enclose an = sign in your HTML unless you know why you are doing it.

Do you see how the quotes enclose the = sign before the word 'true'?

bad: loop="infinite autostart=true"

The same problem happens here:

bad: td align="center valign=middle"

Do you see how the quotes enclose the = sign before the word 'middle'?

It should be:

td align="center" valign="middle"

Error
Invalid words or disallowed element names found in your style tags. (Class or ID names must be preceded with a . or #).

object
input
form

Should be
If your code is like:

#n, #nst, #ol, #m, #mb, #ban, .ban, object, input, form, .nst, .hdr{display: none;}

Just remove the invalid words so that you would have:

#n, #nst, #ol, #m, #mb, #ban, .ban,.nst, .hdr{display: none;}

If your code is like:

object, input, form{display: none;}

Then just remove the entire line.

Error
I try to add:

<a href=http://url.com/x.phtml?string=Poogle Plushie>Poogle Plushie</a>

and I get:

0.) poogle

* <a href=http://url.com/x.phtml?string=Poogle Plushie target=_blank>

1.) plushie

* <a href=http://url.com/x.phtml.phtml?string=Poogle Plushie target=_blank>

Should be
You must enclose the url in quotes:

<a href="http://url.com/x.phtml?string=Poogle Plushie">Poogle Plushie</a>