Forum Moderators: open
this point has briefly just been touched on, but i would like confirmation,
i know it makes sense to use the h1 tag at the beginning of the page as a title header and like everyone else i know how ridiculous it looks.
When i use this piece of code at least it looks respectable, but what will Google think, will it accept it as a title header or demote it to normal font-size text?
<h1><font size="2" face="Arial, Helvetica, sans-serif">Small Blue Widgets.</font></h1>
thanks in advance
Colin
<font size="2" face="Arial, Helvetica, sans-serif"><h1>Small Blue Widgets.</h1></font>
and keep the <h1> tag as close to the text as possible. He never steered me wrong with any of his other advice.
Later on, I've heard people suggest putting everything in an external style sheet.
So, I'm not sure if I helped clear this up, or just added more questions.
Michael
Hmm, doesn't sound like much of a guru to me - if you put the font tag outside the h1 tag, it doesn't change the heading at all!
colinf - use CSS.
For that matter, use the stylesheet to style all your elements and you can remove alot of code bloat from your documents.
I'm pretty sure Google does not read CSS files. At least not yet. Anyway, I don't think anyone would be happy with a straight <h1> with no style at all. They're HUGE!
Firstly, I don't think this will do you harm, as such.
Secondly, I don't know which Google would see, but if you use the spider simulator here [searchengineworld.com], that should give you an idea.
Thirdly, it's bad code, so don't do it. A better, and more common, approach would be
<h1 style="font-family: Arial, Helvetica, Sans-Serif; font-size: 10pt">Small Blue Widgets.</h1>
I've also seen many add font-weight:normal; to their css rules when the tags are normal by default. Are there bugs in the browsers that may render a default normal font in some other weight? Or render a default bold font in something other than bold?
Should I be specifying font-weights on rules where the defaults are known?
I tried the Spider Simulator abovea and received the following on the first line:
Status 200 (return error code 0)
However, when i look at their key there is nothing for "Status 200" or "error code 0".
Can anybody explain what these mean and if my site is "ok"?
Thank you.
Well, whose defaults do we mean? ;)
I think alot of the CSS nuts out there also have a programmer "best practise" attitude.
For maximum forward compatibility you really do (IMO) need to cover the SPEC not the BROWSER.
If the spec says a user agent can handle an element any way it pleases, I think it best to spell out how you want it done...
Nick
Could you expand on that? I don't see anything wrong with the code quoted. Are you saying that because the h1 is in a <div class=body> this is a problem? I can't see how this would be the case.