Web Design Tips – Using CSS To Optimize Code Order
Think of it like a school lunch cafeteria. If you fill up all the kids on cake first, you can’t expect them to stick around for the green bean casserole.
In other words, order matters when it comes to web design and search engine optimization (SEO). As you probably know about SEO, both what you see on the page and what is going on behind the scenes in the source code matter.
On the page, the place where you’ll usually have the most important keywords and anchor text links is in the main body content. In otherwords, that catchy content just below the logos, headlines, and navigation bars that reaches out and pulls visitors further in. It’s there that it’s easiest to creatively and seamlessly target your site around specific keywords and phrases as part of an overall, comprehensive Internet marketing strategy.
In SEO, remember these two basic rules:
Rule No. 1: Higher on the page in the source code is better for stuff that you want Google to notice. Search engines will eat whatever is put in front of them first.
Rule No. 2: If a web page has two links that take you to the same page, only the anchor text (an important signal for search engines) of the first (highest in code) link will be counted.
Here’s why this matters:
Let’s say you run a auto body shop in Dallas. In your site’s body content, you put in an anchor text link for “Dallas auto body repair” (the term for which you expect most potential customers to search) which, if clicked, takes the visitor to your “services” page. It fits your content, and it’s more specific than a more generic search term like, well, “services.” But since there’s already a link in your navigation bar (and therefore higher up in the code) to the “services” page, the “Dallas auto body repair” link won’t get counted by Google. That smart, well-researched search term (“Dallas auto body repair” ) won’t help your SEO as much as it could.
Make sense?
The typical code order for a basic four-section page goes like this:
- Top bar (navigation, logos)
- Side bar (links, more navigation)
- Main body content (catchy, keyword-heavy content and anchor text links)
- Footer (more navigation)

So in theory, if you flip the main body content and the top bar, you avoid these link conflicts. Google will index your more descriptive, more tailored links from the body content. Similarly, by paying attention to code order in your web design process, you can better control which links on different sidebars will be indexed first.
It sounds simple, but it can amount to a fairly significant overhaul of your site’s code, so the best time to do it is during a major site website redesign, or during the initial development of your website.
Contact us about coding options or a more detailed explanation about how to do this with our expert Dallas website designers. In a competitive SEO market like Dallas, every little bit can help your business stand out.