I was wondering if there are any SEO side effects if I put my <script>
and <style>
tags anywhere other than in HEAD. Or is it just due to the XHTML rules that this is bad?
views:
124answers:
2
+2
A:
It's just bad practice to do so. HTML is only used for semantically marking up the data on the page.
Styles are for defining how this data LOOKS.
Script is for defining how the page BEHAVES.
The three should be separated / coupled loosely.
As for SEO, I doubt it has any effect at all.
Evernoob
2009-08-31 16:46:48
+1
A:
It has no impact on SEO. Search engines typically ignore script and style blocks regardless of where you put them.
<style> must go in the <head> if you want to validate, but <script> can go nearly anywhere. Indeed, putting scripts at the bottom of the <body> is a common strategy for optimising load times. Either way, there is no difference between HTML4 and XHTML here.
bobince
2009-08-31 16:50:52