How to Analyze Source Code on a Competing Web Site
When you look at the source code of Web sites that get great search engine results, you can learn exactly what they’re doing right and how you can apply these best practices to your own Web site.
For example, you may find that the page seems to be breaking all the best-practice rules, but ranking well anyway — in a case like that, you may discover that they have tons of backlinks pointing to the page. On the other hand, you might discover a very SEO-savvy competitor who you can learn a lot from.
To look at the source code, do the following:
View a competitor’s Web page (the particular page that ranks well in searches for your keyword, which may or may not be their home page) in your browser.
From the View menu, choose Source or Page Source (depending on the browser).
As you look at the source code, keep in mind that the more extra stuff it contains, the more diluted the real content becomes. For good search engine ranking, a Web page needs content that’s as clean as possible. Too much HTML, script, and coding can increase page loading time, bog down the search engine spiders, and, most importantly, dilute your keyword content and reduce your ranking. Webmasters may not agree with this principle, but from an SEO perspective, a Web page should be a lean, mean, content-rich machine. Want to see if your competitor is doing things right? Look for these types of best practices:
Use an external CSS (Cascading Style Sheet) file to control formatting of text and images. Using style sheets eliminates font tags that clutter up the text. Using a CSS that’s in an external file gets rid of a whole block of HTML code that could otherwise clog the top section of your Web page and slow everything down (search engines especially).
Get to the meat in the first hundred lines. The actual text content (the part users read in the Body section) shouldn’t be too far down in the page code. It’s a good idea to limit the code above the first line of user-viewable text overall.
You want to get a feel for how this Web page is put together. Pay attention to issues such as
Doctype: Does it show a Doctype at the top? If so, does the Doctype validate with W3C standards?
Title, description, keywords: Look closely at the Head section (between the opening and closing Head tags). Does it contain the Title, Meta Description, and Meta Keywords tags? Notice how the tags are arranged. The best practice for SEO puts them in this order: Title, Description, Keywords. Does the competitor’s page do that?
Other Meta tags: Also notice any additional Meta tags ("revisit after" is a popular and perfectly useless one) in the Head section. Webmasters can make up all sorts of creative Meta tags, sometimes with good reasons that may outweigh the cost of expanding the page code. However, if you see that a competitor’s page has a hundred different Meta tags, you can be pretty sure they don’t know much about SEO.
Heading tags: Search engines look for heading tags such as H1, H2, H3, and so forth to confirm what the page is about. It’s logical to assume that a site will make its most important concepts look like headings, so these heading tags help search engines determine the page’s keywords. See whether and how your competitor uses these tags.