Ok we all know that header tags hold some weight, but if I add CSS into the mix does it confuse spiders? For example.... <h1 class="shead">Sub Header</h1> Code (markup):
No I don't believe this confuses spiders. In Fact some people, so I've heard, have used this same technique to make text H1 important to Google, but use CSS to make it look like regular text. Or just text not so ugly as normal/boring H1 tag. I think it is OK, ethically, if you use it as H1 is intended to be used. As a heading. But I certainly don't want my headings to not match my page colors and sizes. Others might feel different though.
I had a feeling I just wanted to check before I started to use it on some of my clients pages. Thanks for your input...
Header tags are NOT given special extra weight. What matters is the font size. A bigger text is more important than a smaller font text. Header tags are only used to judge the font size. If you write your headers with classic font tags (in a big font), you won't lose any SEO benefit.
What makes you say that then? Just for clarification, you are saying that a H1 holds just as much weight (no more) as some copy within <p> tags...
NO. I am saying that the relative font size matters (bigger font text has more weight than smaller font text). Google's parser needs to know the font size of the text. The problem is that Google does not read external css files. So, it has to guess the font size of H-tags and div tags. If the text in H-tags is not long, it may assume it is big font. But if it is a whole paragraph, it should be treated as normal text. If you use css within the HTML or simply use font tags, google will determine the font size with 100% accuracy. The only advantage of H-tags is if you have external css. In this case if you use <div class="some_header_style">your headers here</div> then Google's parser may not discover that it is a big font text. But if you use h-tags it may assume the text is in big fonts. So if you put your headers in <font size=5>..</font> you are telling that this text is in big font. H-tags won't have any advantage over font tags in this case. It's all about font size (not tags).
So you are saying this... Using H tags has no benefit unless you are using an external style sheet. Forget about using inline CSS because you can just use <font size=5>...</font> instead... Well, doesn't this kind of go againt the reasons that someone might like to use CSS in the first place? CSS (IMO) is pretty much worthless unless you use an external CSS file to controll it. The power with CSS is in being able to control how your whole site looks, through 1 file. Font size (when using CSS) should be controlled by an external CSS file. That is kinda the point... ------------ So for clarification, as long as I use an external CSS file, H tags should *still count*. I'm just not sure that is right. H tags are used for headings. SE's should recognise this and then work the SERP's out accordingly.
CSS is great. I use it, everybody uses it. The problem with it, is that google does not index external css files. So it uses heuristics to judge the font size of H-tags. So H-tags should count as bigger font, unless the text within the H-tags is too long.
do you have any data to back this up? I would have thought g not looking through external stylesheets was ideal. It'll just assume that h1 are more importamt that anything in a <p> tag - which is what we all want isn't it? I always have a look at my pages without the external stylesheet, to see what g looks at. In which case how would you define 'too long'. With no stylesheet my page has no defined constraint of width, and my titles have free reighn to run right across my 1280x1024 monitor
i believe that google DOES make a difference between a h1 tag and a font size=x tag.. google does look at your html sites, and verifies that it has the basic tags 99% of the sites should have.. if it doesn't, less ranking for you.. also, it is able to read styles from external css files; there are websites showing you exactly how google sees your page (text mode); so you can test this by modifying your css h1 tag in your external css, and just adding <h1>text</h1>; inserting different values will make the text different, even when seen by spiders (plus i don't think font size matters at all, it's the tags that do) p.s.: don't trust me on this, ask more people, or even better, ask google.. maybe they'll actualy tell ya
Nonsense. So far I have not seen any evidence of g penalising your site for having non valid code. But doesn't apply all css rules to the content. eg there (at the moment) doesn't appear to be a penalty for using display:none for keyword stuffing Just detach your external stylesheet - you don't need a third party for that. OR use ff with the css developer plugin to turn off css in your browser. (plus i don't think font size matters at all, it's the tags that do) correct
so what your saying is for 2 pages with identical content, but one has bad markup and the other doesn't. G will rank the one with good mark up above the one that doesn't. Which means what your saying is that G will penalise you for bad code. Where is your proof of this?
it won't penalise you, you're seeing the other half of the glass.. for 2 pages with identical content (given the fact that google wouldn't penalise any of them for that), the page that has a good html code build would be.. let's say more "favored" than the other.. so if the 1st one has <html><head></head><body>text text text</body></html>, and the 2nd one ha <html><head><meta keywords /><meta description><title>abc</title></head><body><h1>text</h1>text text</body>, which one do you think google will rank higher?
I'd assumed that by identical content the same text would be used for: - the title tag - page titles - the text - the meta data on both pages By bad markup I meant - not closing tags eg tables, divs, fonts - using outdated attributes - not complying with the doctype As an example this page : http://forums.digitalpoint.com/showthread.php?t=2117 The one you are looking at now has 60 html errors / warnings: line 285 column 66 - Warning: <br> element not empty or not closed line 292 column 72 - Warning: <br> element not empty or not closed line 299 column 71 - Warning: <br> element not empty or not closed line 307 column 71 - Warning: <br> element not empty or not closed line 314 column 71 - Warning: <br> element not empty or not closed line 573 column 2 - Warning: missing </pre> before <div> line 573 column 206 - Warning: inserting implicit <pre> line 777 column 2 - Warning: missing </pre> before <div> line 777 column 206 - Warning: inserting implicit <pre> line 2986 column 3 - Warning: <link> isn't allowed in <div> elements line 2986 column 3 - Warning: <style> isn't allowed in <div> elements line 55 column 1 - Warning: content occurs after end of body line 17 column 1 - Warning: <script> inserting "type" attribute line 74 column 15 - Warning: <td> attribute value "LEFT" must be lower case for XHTML line 74 column 141 - Warning: <td> attribute value "RIGHT" must be lower case for XHTML line 498 column 4 - Warning: <a> anchor "post20689" already defined line 703 column 4 - Warning: <a> anchor "post20691" already defined line 895 column 4 - Warning: <a> anchor "post20692" already defined line 1059 column 4 - Warning: <a> anchor "post20842" already defined line 1226 column 4 - Warning: <a> anchor "post20874" already defined line 1312 column 20 - Warning: <font> attribute "color" has invalid value "DarkRed" line 1408 column 4 - Warning: <a> anchor "post20884" already defined line 1591 column 4 - Warning: <a> anchor "post20900" already defined line 1677 column 20 - Warning: <font> attribute "color" has invalid value "DarkRed" line 1773 column 4 - Warning: <a> anchor "post20913" already defined line 1942 column 4 - Warning: <a> anchor "post610406" already defined line 2125 column 4 - Warning: <a> anchor "post610497" already defined line 2289 column 4 - Warning: <a> anchor "post610542" already defined line 2497 column 4 - Warning: <a> anchor "post611327" already defined line 2659 column 4 - Warning: <a> anchor "post611371" already defined line 2843 column 4 - Warning: <a> anchor "post611430" already defined line 3025 column 29 - Warning: <input> proprietary attribute "unselectable" line 3576 column 1 - Warning: <script> inserting "type" attribute line 320 column 2 - Warning: trimming empty <tr> line 573 column 206 - Warning: trimming empty <pre> line 749 column 6 - Warning: trimming empty <div> line 777 column 206 - Warning: trimming empty <pre> line 1105 column 6 - Warning: trimming empty <div> line 1272 column 6 - Warning: trimming empty <div> line 1454 column 6 - Warning: trimming empty <div> line 1637 column 6 - Warning: trimming empty <div> line 1819 column 6 - Warning: trimming empty <div> line 2171 column 6 - Warning: trimming empty <div> line 2543 column 6 - Warning: trimming empty <div> line 2889 column 6 - Warning: trimming empty <div> line 489 column 5 - Warning: <a> id and name attribute value mismatch line 694 column 5 - Warning: <a> id and name attribute value mismatch line 886 column 5 - Warning: <a> id and name attribute value mismatch line 1050 column 5 - Warning: <a> id and name attribute value mismatch line 1217 column 5 - Warning: <a> id and name attribute value mismatch line 1399 column 5 - Warning: <a> id and name attribute value mismatch line 1582 column 5 - Warning: <a> id and name attribute value mismatch line 1764 column 5 - Warning: <a> id and name attribute value mismatch line 1933 column 5 - Warning: <a> id and name attribute value mismatch line 2116 column 5 - Warning: <a> id and name attribute value mismatch line 2280 column 5 - Warning: <a> id and name attribute value mismatch line 2488 column 5 - Warning: <a> id and name attribute value mismatch line 2650 column 5 - Warning: <a> id and name attribute value mismatch line 2834 column 5 - Warning: <a> id and name attribute value mismatch line 3143 column 1 - Warning: <form> id and name attribute value mismatch 0 errors / 60 warnings So if all the above were fixed, do you think the page would rank better?
browse the site with lynx... if the errors cause the tags to be denied entirely in the "eyes" of the search engine, then yes (but i think that's more the case in errors.. like having <h 1> instead of <h1>, warnings are ussualy harmless)