Forum Moderators: not2easy

Message Too Old, No Replies

H1 tag with CSS and <BR> tag

         

gouri

1:12 am on Oct 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can you guys please take a look at this and tell me what you think?

<H1 style="text-align:center;font-family: Verdana;font-size: 20pt">Text Here <br /> More text</H1>

I want it to be on two lines.

Is it compact, not too bulky?

tangor

2:39 am on Oct 30, 2008 (gmt 0)

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



Put the style info in a CSS and your H1 then becomes a more compact and readable:

<H1>Text Here <br /> More text</H1>

swa66

2:49 am on Oct 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



font-family ought to be a list ending in a generic font. Not all systems will have Verdana installed.

While I'm generally in favor of using the tags instead of wrapping everything in divs etc, I'm not sure if this isn't going to become a misguided effort at stuffing keywords in a <h1>
I fit's a title and a subtitle, I'd suggest a <h1> and a <h2> instead of the line break.

Also <H1> isn't proper xhtml, while <br /> is ... what doctype are you using ?

gouri

12:18 pm on Oct 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Tangor,

Are you saying use external CSS?

Swa66,

At the moment I am using two H1 tags, but I think it would be better to have one H1 tag and use a <BR> tag to separate the phrases. The two H1 tags are used before the main text of the page. I think Google likes one H1 tag more?

The doctype is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional

I am not sure what would be the best heading tag to use with this doctype. Can you please tell me?

tangor

12:27 pm on Oct 30, 2008 (gmt 0)

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



CSS is cascade style sheet(s) and usually those statements are external but can be in document between head tags.

I think we've had this query recently elsewhere... Keyword stuffing in h1 (or multiples) and backing down to two phrases keyword stuffed with a br... misremembering?

No matter.

h1 is title/description of page, no matter how many words (use too many at your own SEO peril) and then follow with appropriate h2

STYLE h1, h2, h3 etc in css either in doc or external.

The hx tag don't make the page... the CONTENT does. H1, widget description, maybe an image, and get on with the next page! No rocket science involved... but PRODUCTION of pages is.

gouri

1:23 pm on Oct 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I combine the multiple H1 tags and the one H1 tag has less than 10 words but has a <BR> tag, would that be ok? In terms of words, I think that could be ok.

swa66

2:34 pm on Oct 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Ah, the SEO side is already being discussed here: [webmasterworld.com...] , so please let's just deal with the CSS.

Given you use an xhtml doctype, you need to use lowercase tags. not <H1> but <h1>.

To make it compact: add a link in the header


<link rel="stylesheet" type="text/css" href="/style.css" />
to an external stylesheet that contains
a.o.:

h1 {
text-align:center;
font-family: Verdana;
font-size: 20pt;
}

I'd make the font-family a list ofr those not having Verdana installed. E.g.:


h1 {
text-align: center;
font-family: Verdana, Helvetica, Arial, sans-serif;
font-size: 20pt;
}

Your html then becomes:

<h1>Text Here<br />More text</h1>

[edited by: swa66 at 3:28 am (utc) on Nov. 7, 2008]

gouri

2:41 pm on Oct 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thank you helping me with the code. It looks great.

If I could ask you, is the css file uploaded to the same area where I would upload images and when I want to use CSS I can link to the document?

gouri

9:24 pm on Nov 6, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does inserting a <br /> tag in between phrases in an H1 tag reduce the affect of the tag in the SERP? Also, if you are inserting a <br /> tag in the H1 tag would you try to put your main keywords before the <br /> tag instead of after if possible?

Is it better to use a - or : instead of a <br /> tag and put the two phrases of the h1 tag on the same line instead of on two lines? I mean the affect in the SERP?

I would appreciate if someone could help me with this.

swa66

3:30 am on Nov 7, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Please keep the SEO aspects in the other thread: [webmasterworld.com...]

gouri

3:38 am on Nov 7, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, I am sorry about that.