Tables. Font tags. CSS/XHTML. Eyes glazing over yet? Well try to keep the lids open just a little longer. I promise to make this as fun as possible (or you can just skip to the video at the end).

Your web design is just a bunch of text

If you “view source” on your website you’ll see a bunch of text. That text is “the code” of your website. Your web browser (Firefox, Safari, IE, Chrome or whatever you use to surf the web) reads the code and then draws the website on your screen. Search engines and other computers also use this code to learn about your site. In fact, the search engines don’t look at what your site looks like at all, only what is written in that code. A search engine is only reading the code and doesn’t care how pretty your website looks.

You can't tell if the code is good by looking at the web page, you need to view the source.

A pretty web design could be the result of good or bad code. You need to view the source to be able to tell the difference.

There are many ways to write code and get the web browser to draw the same thing. Some of the ways to code the site are “bad” and some are “good.” And the only way to know if the code is bad or if it’s good is to look at the source. Your site may look pretty to you, but it may be miserable for other users or unreadable to search engines.

What does “bad” code look like?

Bad code can look like a lot of things. Unless you’re a web developer you’re going to get bored in a hurry if I go through all expressions of bad code. But I’ll give a quick way to tell if your code is really really bad.

Some key indicators of web code that might be hurting your internet marketing:

  • If you see <table> in the code but there are no spreadsheet-like tables in your content.
  • If there is almost nothing that makes sense to you when you read it and you see <object> and a bunch of other non-meaningful in the code.
  • If you do not find <h1> in the code anywhere or if you can’t make sense of what comes right after it
  • If almost all of your code involves <image src= followed by stuff that doesn’t make sense.

What makes “bad” code so bad?

Bad code is anything that doesn’t support your business objective. For the rest of this post I’m going to assume that your business objective involves internet marketing.

Here are two ways that bad code can get in the way of your internet marketing (I bet there’s more):

  1. If your online marketing strategy involves using search engines, then bad code is anything that gets in the way of the search engines.
  2. If your online marketing strategy is targeting visitors who are impatient with slow-loading websites, then bad code is anything that slows down your website.

Bad code derailing your search engine optimization efforts?

Bad code can be responsible for a web page that looks great to humans, but is completely unreadable to a search engine. If you can’t find anything in your code that makes sense, then the search engine can’t either. The search engine will treat it just a page full of random gunk. The more readable stuff in your web code, the more likely a search engine is going to find your page useful.

If humans can't read your code then SEO will be hard

SEO efforts are harmed when the search engine spiders can’t read your code.

You will always need some sort of code to make the page work, but you want all that structural code to be as minimal as possible. Think of it like a percentage. You want a high percentage of stuff you can read compared to the stuff that is structural code. The search engine is always going to like sites that have the most useful content, they have to in order to remain relevant.

SEO and internet marketing are improved when you have more good code.

If another site has a better good code/bad code mix, then it will rank higher than yours.

Take Google, for example. If Google started returning all garbage pages that weren’t any good and some other service returned pages that were full of useful content, then more people would use the other service. And if more people used the other service then Google would make less money selling the ads they sprinkle around the margins of their search engine results page.

Search Engines are built to help humans. They will always like good content.

At the end of the day you’re marketing to humans and so are search engines. Both like lots of good content.

The search engine may be a machine, but it has to keep real humans happy. One way the machine determines whether people will be happy to see the page is by determining how much useful content that anyone can read is on the page compared to how much structural stuff that might be good or might not be so good.

Bad code frustrating your users?

Sometimes the way a web site is built can really slow it down. This is usually where people start talking about Flash and how evil it is. I won’t do that because there are ways to use Flash that don’t slow down a web site. All the same, make sure your site isn’t using too many graphics or a complicated layout that uses a bunch of the <table> things I noted above.

If your code is too complicated or includes a lot of images, it may be slow to load because the browser has to sort out the complicated code and then go fetch the images. Yes, seconds do matter to web visitors.

Bad code hurts your internet marketing because users hate it

Bad code slows down your visitors, too. Bad for internet marketing.

Just because broadband is getting better penetration doesn’t mean we don’t have to worry about load time either. Because now we have a lot of cell phones and other mobile devices starting to browse the web and these little machines on their internet connections work faster when you have more good code.

I’ve got bad code! I’m firing my web designer!

A word of caution here. You might have bad code for a variety of reasons. Here are two things you should consider before getting too worked up:

  • If your website is five or more years old, remember that your website may have been good when it launched. New good coding methods are always being developed.
  • This second one might be hard to take. You might have made design requests that could only be accomplished with bad code. Like a gigantic full-page image of some sort, or a great big animation or video, or very very specific control over where every pixel is on the screen. Sometimes meeting client demands can result in bad code (though your designer should at least give you a warning that you’re going into bad code territory).

I don’t want to read all this, I just want to watch a video about internet marketing and code

Here you go. My favorite internet marketing musician, SEO Rapper brings you through everything you need to know to keep your code all good.

[youtube]http://www.youtube.com/watch?v=a0qMe7Z3EYg[/youtube]