Falling into Coding Traps, and Ways to Keep out of Them

By On 3, Jun, 2011 |  In: Website Development |  | 0


There are a lot of ways to produce “Bad” code. Many website designers try to do things too fast or don’t check their work as they go. Allowing the programs that you use to write code, such as Adobe Dreamweaver, input your code by working in the “Design View” can be a bad idea. At times it can add extra “tags” to your pages and you could end up with “Empty” paragraph tags or multiple line-breaks.

Some of the traps “Coders” fall into are of their own making, like using improper code just because it seems to work. A few examples I have seen are using literally “Hundreds” of “Non-Breaking” spaces (&nbsp) to move something over to the right of a page when you can do it with “CSS” and lose all of the extra code on your page. Another one is putting “List-Items” (< li > )in the content without using a “List” around them ( either an “Un-ordered List” < ul > or a “Ordered-List” < ol > ) this may look ok, but it is incorrect and some browsers may try to fix it for you causing additional problems.

It is not just when coding pages that problems can  appear, creating pages can bring out the “Bad” coders. Leaving spaces in the “Page” name ( The one that will be in the URL ) can cause problems that might not show right away, the links to the page may show as broken in your “Webmaster” account, and the links to the page may not work.

One last thing I have seen is using improper “Extensions” on your images or spaces in the file name. People may think “.JPG” is the same as “.jpg” , but it is not , some browsers may find your image if it has a incorrect “Extension” but not all of them will. It is best to use the “Proper” “.jpg” on you “JPeg” images , same goes with all types of images you may want to use.

So to keep out of these “Traps” you should Check your pages as you go, keep your “Code” clean and properly “Formatted” and use “CSS” to control how your “Pages” look. If you need help with any “Coding” the best Resource is the “W3Schools” website. They give quick explanations of how HTML tags and CSS properties work.

Leave a Reply

Your email address will not be published. Required fields are marked *