Forum Moderators: open

Message Too Old, No Replies

h1 quickie

         

colinf

1:43 pm on May 16, 2003 (gmt 0)

10+ Year Member



hello all,

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

Macguru

1:48 pm on May 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi colinf,

Most people use CSS to fiddle with H1 nice and easy.

dzinerbear

1:49 pm on May 16, 2003 (gmt 0)

10+ Year Member



A search engine guru that I used to work with always told me to put the modifiers outside the <h1> tag like so:

<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

Receptional Andy

1:51 pm on May 16, 2003 (gmt 0)



>>A search engine guru that I used to work with always told me to put the modifiers outside the <h1> tag

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.

Yidaki

1:52 pm on May 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This recent thread could answer your question(s): Can misuse of <H> lead to loss of PR? [webmasterworld.com] ...

Birdman

1:52 pm on May 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I can't say, for sure, how Google will react to the font tags within the <h1> tags but if you are worried about it, use an external stylesheet to style your <h1> tags.

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!

needinfo

1:53 pm on May 16, 2003 (gmt 0)

10+ Year Member



colinf
I always use CSS files. However just to confuse you even more I've read a post about spamming techniques where somebody was suggesting that disguising the size of a H1 tag in a CSS file could be seen as spamming.
I personally think that's nonsense.

Nick_W

1:54 pm on May 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




h1 {
font-family: arial, helvetica, sans-serif;
font-size: 1.4em;
font-weight: bold;
padding: .4em;
color: white;
background-color: black;
}

You can do whatever you like with CSS and it's very easy...

Nick

EBear

1:56 pm on May 16, 2003 (gmt 0)

10+ Year Member



Colin,

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>

EBear

2:02 pm on May 16, 2003 (gmt 0)

10+ Year Member



Wow guys! There were no answers to this when I started typing mine. Got to learn to type faster.

pageoneresults

2:10 pm on May 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Nick, quick question for you. In the code you posted for the h1 you have font-weight:bold; specified. Is this necessary since the <h> tag is bold by default?

Nick_W

2:13 pm on May 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, that's a good question.

In reality, no, it's not really needed. In theory it is as browsers are free to make their own decisions on how to display h elements (i think...).

It's just there as a way to demo the simplicity ;)

Nick

pageoneresults

2:21 pm on May 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I've seen a lot of css in my time and I also see many who specify font-weight:bold on elements that are bold by default i.e. <h> tags.

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?

ogletree

2:28 pm on May 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



My web designer does it this way

<div class=body><h1>Auto Accidents</h1>

It looks good but is it Ok?

thereuare

3:36 pm on May 16, 2003 (gmt 0)

10+ Year Member



Hi, i'm fairly new to all of this (what a first google dance to watch!).

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.

Receptional Andy

3:40 pm on May 16, 2003 (gmt 0)



Have a look at this guide [php-faq.com] to http status codes. 200 means 'OK' - the request has succeeded. This is what you want to see :)

DaveN

3:41 pm on May 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



ogletree

I would be careful google may see it as a little misdemeanor but a few more and you may find yourself in trouble.

DaveN

Nick_W

3:43 pm on May 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>>defaults are known?

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

Receptional Andy

3:48 pm on May 16, 2003 (gmt 0)



>>I would be careful google may see it as a little misdemeanor

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.

BergtheRed

9:56 pm on May 16, 2003 (gmt 0)

10+ Year Member



i see nothing wrong with ogletree's example either. <div class="body"> could be specifying background, positioning and any other sort of attribute while the <h1> tag is specifying a heading.

g1smd

10:21 pm on May 16, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



<font ..><h1>blarg</h1></font> is NOT valid code, as <h1> is a block level element anyway.