by Robert Plank
Posted on May 18, 2008
|
|
No matter who you are or how much you pay for web site advertising, free search engine traffic is probably responsible for a big part of your business. So why make your web site so hard for search engines to figure out?
Luckily, it seems like in the recent years people have paid attention to SEO, moved their sites over to CSS, abolished "table" and "font" HTML tags, started using the H1 tag around their titles... and in general, moved the main content of their site as close to the top of the HTML document as it can go.
"But Robert," you tell me, "I have a bunch of fancy JavaScript and CSS at the top of my site that I don't want to get rid of."
That's ok, you can keep it. Just stash it away in another file. By that I mean... if you were lazy and included your CSS right in the HTML document like this:
Copy all that text out and delete it from the HTML page.
Remove the "style" tags and the "(!--" and "--)" stuff. Open a new text file, paste the text from the clipboard in, save the file as "layout.css" then save and upload to your web server.
Now, back on your HTML page, place HTML code like this:
When someone loads your page in a browser that tells them to look to the URL http://www.example.com/layout.css for the CSS info. But when the search engines crawl your site they will see a nice, clean, simple layout.
You can do the same thing with JavaScript. Say these are your "script" tags:
Do the same thing, copy the JavaScript code but NOT the "script" tags themselves or the "(!--" or "--)". Erase the original from the HTML page. Paste the stuff you copied into a new text file and call it something like: "functions.js"
Upload functions.js and in the spot you had your JavaScript code use this:
One important thing to remember is that NO JavaScript code can be placed between the "script" tags if you use the "src" parameter like that.
So remember: use H1 tags, use meta description tags, and use CSS, but make sure you include your JavaScript and CSS stylesheets in separate files otherwise there's no point.
Luckily, it seems like in the recent years people have paid attention to SEO, moved their sites over to CSS, abolished "table" and "font" HTML tags, started using the H1 tag around their titles... and in general, moved the main content of their site as close to the top of the HTML document as it can go.
"But Robert," you tell me, "I have a bunch of fancy JavaScript and CSS at the top of my site that I don't want to get rid of."
That's ok, you can keep it. Just stash it away in another file. By that I mean... if you were lazy and included your CSS right in the HTML document like this:
(style type="text/css") (!-- CSS code in here --) (/style)Copy all that text out and delete it from the HTML page.
Remove the "style" tags and the "(!--" and "--)" stuff. Open a new text file, paste the text from the clipboard in, save the file as "layout.css" then save and upload to your web server.
Now, back on your HTML page, place HTML code like this:
(link rel="stylesheet" href="http://www.example.com/layout.css")When someone loads your page in a browser that tells them to look to the URL http://www.example.com/layout.css for the CSS info. But when the search engines crawl your site they will see a nice, clean, simple layout.
You can do the same thing with JavaScript. Say these are your "script" tags:
(script language="JavaScript" type="text/javascript") (!-- JavaScript code in here --) (/script)Do the same thing, copy the JavaScript code but NOT the "script" tags themselves or the "(!--" or "--)". Erase the original from the HTML page. Paste the stuff you copied into a new text file and call it something like: "functions.js"
Upload functions.js and in the spot you had your JavaScript code use this:
(script language="JavaScript" src="http://www.example.com/functions.js")(/script)One important thing to remember is that NO JavaScript code can be placed between the "script" tags if you use the "src" parameter like that.
So remember: use H1 tags, use meta description tags, and use CSS, but make sure you include your JavaScript and CSS stylesheets in separate files otherwise there's no point.
SEO Articles
Internet Marketing Articles
Development Articles
General Articles
And also in our Archives
Internet Marketing Articles
Development Articles
General Articles
And also in our Archives
Drive traffic to your business and get recognized as an industry leader by sharing your knowledge on Site-Reference. Authors are given a wide range of exclusive benefits here at SR; so checkout what we can offer to those that…

We’re always on the lookout for new writting talent so even if haven’t written for the web yet, feel free to contact us anytime
We’re always on the lookout for new writting talent so even if haven’t written for the web yet, feel free to contact us anytime




