If you have a Facebook account, click here to continue logging in.


If you don't have a Facebook account, click here to log in with your Neopets information.
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>