Optimizing a web site for SEO purposes means a variety of things to different people; it can mean optimizing your content for keywords and relevancy, optimizing presentation, navigation, usability and a host of other factors.
One factor which many non-web savvy operators overlook is the actual web coding itself.
Web coding is not really computer programming: what is happening is web code is it being used to arrange the representation of a web page. Think of a shop window full of products, the window dresser does not make the actual products on display but they do arrange the display itself and the elements which are used to enhance the product placement. In a nutshell, this is what web coders and programmers are doing – arranging your web display for use in an internet browser, such as Internet Explorer, Chrome or Firefox.
How Does Web Code Impact SEO Rankings?
There are different types of web code available to develop a website, and different versions and types of web code may be used on the same site, so the potential for diversity is high.
Search engines need to navigate your website when they send a webcrawler to index the content for use in returning results to users.
Now what happens when a search engine’s webcrawler is unable to “read” the web code used on a website?
The answer is simple – nothing happens. The webcrawler does not fully “crawl” your website and this means portions of your website are missed by the search engines. This is disaster for the website because when you have portions of the website being missed out by the search engines this reduces your relevance rating for any search by a user and depending on how badly crawled the website is, this can result in no ranking at all!
So What Does Optimizing Code Mean?
The issue is not simply “optimizing code”; it is really about optimizing all of the display elements used to present the website through an internet browser. JavaScript and CSS (Cascading Style Sheets) are two major ways of creating a representation of the html/xhtml code (which is the “real” web code) within an internet browser.
For example, you may have a website coded in xhtml, which uses JavaScript to form the internet browser representation of the website which may also include animated Flash elements.
The problem is that some forms of code are better at being searched and indexed by search engines and some are almost indecipherable. This means that how well your website is indexed and how high it will rank is directly dependent on whether search engines can crawl your web code or not.
What Do the Search Engines Like?
The ideal from an SEO perspective is to use CSS to represent your html/xhtml code and utilize plain text links, because webcrawlers find these easy to follow and understand. The problem is that while this SEO “dream team” combo is great for getting your site crawled, they are not optimal for your users viewing pleasure.
Search engines like a simple layout with a simple to navigate website and code they can read easily which usually means code for static elements.
Human users like changing and dynamic elements, audio and video content but how does a search engine index the song lyrics as they are sung?
It cannot.
Designers love using fancy presentation elements such as animations and vide using Flash, but the problem here is that Google is barely able to index these files (most are ignored and at best indexing will be very patchy). The issue is that there is a very clear conflict between using web design elements to enhance user experience but also use web coding which will allow the site to be effectively indexed by the search engines.
Realistically, the question is wrong – it is not how do you optimize code for search engines but what is more important between pleasing users and pleasing search engines.
The answer is not simple and there is a delicate trade-off between the two conflicting, but vitally important requirements, but that is a tale for another post.
Takeaway
“Web code” means a variety of things depending on what you are referring to – the actual code to construct a website or the means by which website elements are displayed in an internet browser.
CSS, JavaScript, html, XHTML and Flash are all examples of what is being referred to when we speak of “optimizing web code”, but only html/xhtml are really web code in fact.
Search engines cannot crawl or understand all the different types of web code used on most websites today. Some code cannot be read at all, some only a little and some very well – which is used in your website will determine how much of the website is indexed and used in search results.
This means your web code directly impacts on how well you will rank in search engine results but using search engine friendly code does not mean it will deliver a positive user experience for human visitors.