Some Essential HTML Code that all Bloggers Should Know

rubiks_cubeI know a lot of SEOs that say that it’s impossible to effectively practice SEO without a working knowledge of HTML. While it may be very subjective to determine how much coding ability constitutes a “working knowledge,” I think it’s valid to say that there are certain aspects of HTML code that any SEO or digital marketer should be able to implement properly. I’d extend that to copywriters, as well.

With the advent of WordPress, having your own website, without paying a developer to build it for you, was suddenly a much simpler process. If you published decent content and had a sizeable social following, you could even generate some traffic without being an SEO. Good content still attracts links, so gradually, you might even achieve respectable rankings.

Some things, though, necessitate some HTML knowledge.

Links

The WordPress backend provides plenty of shortcuts, like building a link into your content, complete with anchor text, or making it open in a new tab. But they’re just that: shortcuts. What if you want to link to a site that you aren’t comfortable “vouching” for? In that case, you’ll want to include a rel=”nofollow” on the link. If you don’t know how to do that, you could be putting your own site at risk.

Are Shortcuts Enough?

A plain link is coded as <a href=”URL”></a>, replacing, for instance, “URL” with “http://www.seocopywriting.com”. But if you want to display that link with anchor text, it would be coded as <a href=”http://www.seocopywriting.com”>Heather Lloyd-Martin’s website</a>. If you want to nofollow that link and open it in a new tab, it then becomes <a href=”http://www.seocopywriting.com” rel=”nofollow” target=”_blank”>Heather Lloyd-Martin’s website</a>.

Redirects in the .htaccess file

What if you decide to change a URL or delete a page altogether? You can’t just create the new page and delete the old one … that would create a 404 (not found), which is terrible for your readers and not at all beneficial for your site.

So we create a redirect from the old URL to the new, so that any links to the old page will bring users to the new page (along with any link equity that might pass). In some instances, you might do this only temporarily, using a 302 redirect, but most often, it will be a permanent change, so you’ll want to use a 301. With a 301, the search engines’ spiders will follow the redirect and browsers will cache it. Browsers will not cache a 302 redirect, however.

Incidentally, a 301 redirect will convey nearly the same amount of link equity as a standard link, which is believed to be something between 85%-90% of the total potential link value. Let’s assume it’s 90%. In that case, a link to your page would only deliver about 90% of its total value. In a recent Google video, Matt Cutts stated that at that time, a 301 passed precisely the same amount as a link. So bear in mind that an incoming link, redirected via a 301, would only deliver about 81% of its value (.90 x .90 = .81). 302 redirects, by the way, are believed to pass no link equity at all.

So whenever possible, even though you’ll still need to redirect the URL, you should always try to have the link changed to the new URL … it’ll bring more equity onto your page.

So how do you do a redirect? It’s fairly simple, really. Since most of us are on Apache servers, I’ll stick with that. Within the .htaccess file of your site, you insert:

RewriteRule ^old\-page\-to\-redirect\/$ “http\:\/\/seocopywriting\.com\/new\-page\/” [R=301,L]

If you want to include several redirects, you simply add more. You can also ensure that relative URLs to either your www or non-www version will be redirected, thus:

RewriteEngine on

Header set Connection “Keep-Alive”

RewriteCond %{HTTP_HOST} ^seocopywriting\.com$ [OR]

RewriteCond %{HTTP_HOST} ^www\.seocopywriting\.com$

RewriteRule ^old\-page\-to\-redirect\/$ “http\:\/\/seocopywriting\.com\/new\-page\/” [R=301,L]

The first 2 lines aren’t essential – they simply ensure that the rewrite engine is active and keep it that way. Lines 3 and 4 handle redirecting links to either the www or non-www version. The last line redirects http://seocopywriting.com/old-page-to-redirect to http://seocopywriting.com/new-page and classifies it as a 301 redirect.

Note that the old page’s URL is a relative URL, while the destination page for the redirect must be an absolute URL.

Don’t Stop There

Now you know how to link to a site safely, without risk of passing link equity and possibly drawing the sort of attention from Google that nobody wants.

You can also create an .htaccess file to handle your server-side redirects, steering your visitors to your most current pages without creating 404s or losing link equity.

There is a lot more that you can learn to do, with no need of an extended course of study in programming. A great place to start, if you’re interested in learning more about HTML, is the W3C HTML Primer. If you already know the basics, but would just like a reference sheet to fall back on, check out Web Monkey’s HTML Cheatsheet

About the Author

Doc Sheldon has been in publishing for nearly 40 years, first in newspaper and magazines, and working online since 2003. He is co-owner of Top Shelf Copy, owner of his own SEO agency and is chief editor on The Meld. Doc’s passionate about the Semantic Web, good whisky and bad dogs. You can learn more about him on Google+ or follow him on Twitter.

Don’t miss out on any of our posts! Sign up for the SEO Copywriting Buzz newsletter now!