Welcome to WebmasterWorld Guest from 3.226.251.81

Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Experiment with <title> outside of <head> section

     
1:37 am on Nov 15, 2006 (gmt 0)

Junior Member

10+ Year Member

joined:June 18, 2005
posts:49
votes: 0


I wanted to see how much weight Google put on the <title></title> position and put it outside my <head></head> elements...

Google is still ranking my main index page #1 for the keyword phrase in the title. Looks like Google is more flexible than I first though...

Anybody see something similar?

1:27 pm on Nov 20, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


Why would you put deliberately set put to put an HTML element in a non-valid position?

Do you think that title tag text should rank better because you included it in the body?

I would hope that it dinged at least a point off the page score for trying too hard.

6:04 pm on Nov 20, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:May 26, 2000
posts:37301
votes: 0


Sounds like Google's error recovery routines have forgiven you. I have also seen others forgiven when they accidentally place <head> elements inside the <body> element. But there's no reason to assume you would get an advantage, and I agree with g1smd - I sure wouldn't experiment with invalid mark-up on a URL that is ranking well.
2:01 pm on Nov 21, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:June 13, 2004
posts:650
votes: 0


"Title" outside the head section is just a regular property which can be used in most page elements, to describe tables, rows, cells, links, form elements and so on. Mostly used for tooltip purposes.
It could be seen just as badly positioned property with the closing tag and most important, it doesn't break the page.
2:16 pm on Nov 21, 2006 (gmt 0)

Senior Member from MY 

WebmasterWorld Senior Member vincevincevince is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Apr 1, 2003
posts:4847
votes: 0


I've seen many pages with multiple <body> and even <html><head> sections... all seem to do okay in Google.
2:17 pm on Nov 21, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


How much better would they do with the errors corrected?
2:33 pm on Nov 21, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 5, 2006
posts:2095
votes: 2


I have to agree with g1smd here, I am real big on validtion on html properly showing on all browsers.
4:56 pm on Nov 21, 2006 (gmt 0)

Full Member

10+ Year Member

joined:July 21, 2005
posts:213
votes: 0


MC said that 40% of all sites have HTML errors, so that Google can't penalize faulty HTML.

IMO there's nothing more stereotyped than a page that validates. If a SE has to choose between a page that validates and a page that is original, they'll choose the latter 10 out of 10 times, unless the latter shows up upside down, or something.

[edited by: Martin40 at 4:58 pm (utc) on Nov. 21, 2006]

4:58 pm on Nov 21, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


They don't penalise faulty HTML, but if your error causes the parser to skip a section of your content or not follow a link to some other part of your site then you have penalised yourself.
5:01 pm on Nov 21, 2006 (gmt 0)

Full Member

10+ Year Member

joined:July 21, 2005
posts: 213
votes: 0


They don't penalise faulty HTML, but if your error causes the parser to skip a section of your content or not follow a link to some other part of your site then you have penalised yourself.

Okay, but as long we don't start putting titles outside of headers, I don't see what error could produce your doomsday scenario.

5:07 pm on Nov 21, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


Try this for starters:

[google.com...]

Look how many people failed to properly code their title tag, and end up with a duff title and/or snippet in the results. Yes, more than 10 million pages.

The most common error is in coding the closing </title> tag as either <title> (missing the / character) or as /title> (missing the < character).

With it coded properly those pages would probably rank a lot higher for whatever they intended to target than they do now. Twenty seconds spent at [validator.w3.org...] would have completely avoided the problem.

5:12 pm on Nov 21, 2006 (gmt 0)

Preferred Member

10+ Year Member

joined:Jan 11, 2005
posts:513
votes: 0


They don't penalise faulty HTML, but if your error causes the parser to skip a section of your content or not follow a link to some other part of your site then you have penalised yourself.

I have some pages on one of my sites that were built with a HTML editor from one of those free web hosts in the late 90s. It put FONT tags INSIDE THE A HREF! i.e., <A HREF="http://example. com/page1.html><FONT f ace="Arial"><FONT s ize="blah blah blah">Page 1</FONT></FONT></A>

I've often wondered if that's hurting me, it didn't use to matter but who knows now. I'm fixing them as quickly as possible, but it's a lot of work.

(Spaces added to HTML to not cause problems here at WebmasterWorld)

[edited by: AndyA at 5:16 pm (utc) on Nov. 21, 2006]

5:21 pm on Nov 21, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


There is a better way to fix them.

Use CSS.

It will make the HTML code on your page much lighter.

Make sure that all your content is enclosed in blocks: headings, paragraphs, lists, tables, or forms.

Make the HTML code describe what type of content you have.

5:28 pm on Nov 21, 2006 (gmt 0)

Full Member

10+ Year Member

joined:July 21, 2005
posts:213
votes: 0


Try this for starters:
[google.com...]

Look how many people failed to properly code their title tag, and end up with a duff title and/or snippet in the results. Yes, more than 10 million pages.

The most common error is in coding the closing </title> tag as either <title> (missing the / character) or as /title> (missing the < character).

With it coded properly those pages would probably rank a lot higher for whatever they intended to target than they do now. Twenty seconds spent at [validator.w3.org...] would have completely avoided the problem.

Those examples are on par with your title outside of your header. If you made such mistakes you'd better not code your own html.

I'm referring to the fact that w3.org won't validate any CSS page that does something out of the box. It shows up correctly in all browsers but w3.org won't validate it. In such a case validation is a hinder, not a help.

By the way, thanks Brett ;-)

[edited by: Martin40 at 5:40 pm (utc) on Nov. 21, 2006]

6:05 pm on Nov 21, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Jan 5, 2006
posts:2095
votes: 2


Are you using the right w3 validator? Can you give a specific example?

I would like to take a look at that.

6:29 pm on Nov 21, 2006 (gmt 0)

Full Member

10+ Year Member

joined:July 21, 2005
posts:213
votes: 0


My sites are highly visual, so I optimise them for the 3 major screen sizes. PHP doesn't detect screen size, so I use javascript. The best way to go about this is to let javascript write a link to a CSS file, depending on screen size. This link will always be written to the document body, not to the header.
There w3.org blows it's top and won't go on validating, because the <link rel="stylesheet"... tag should be within the header.
The method I use works in all browsers and I feed a <noscript> to the SEs.

[edited by: Martin40 at 6:29 pm (utc) on Nov. 21, 2006]

6:35 pm on Nov 21, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


Huh? Why can't you write the link to the <head> where it should be?

Even so, the validator doesn't do "HTML inside Javascript" wherever you place it.

I'll bet that you will need to break a tag apart to stop the validator seeing it, like: '</t' + 'ag>'

6:50 pm on Nov 21, 2006 (gmt 0)

Full Member

10+ Year Member

joined:July 21, 2005
posts: 213
votes: 0


Huh? Why can't you write the link to the <head> where it should be?

Because I'm using javascript's write function. That will always write to the body, not the header.
I'm using javascript's write() so that a link to the appropriate stylesheet can be inserted, depending on the user's screen size.

I'm not going to write funny tags just for a validation that is an exercise in pedantry.

7:58 am on Nov 22, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Dec 19, 2004
posts:1939
votes: 0


Im a little unclear as to the purpose of the experiment?

Are you thinking creating these types of erros can help rankings in any particular engine?

9:31 am on Nov 22, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member suzyuk is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Oct 1, 2002
posts:5199
votes: 0


to rely on error recovery routines is IMO asking for trouble, While it is not always necessary to have a perfectly valid site, a sites document structure is its foundation. If that foundation is unstable you should expect that it could fall down in some circumstances.

Just because it's OK in SE's and browsers at the minute doesn't mean it won't be when something stricter gets its hands on it? IE had the biggest forgiveness rate of all when it came to HTML structure and we're still educating people that what they see is not always what they're getting.

I'm not at all sure it's best practice to encourage that kind of thinking to continue, perhaps Google and others won't correct the error forgiveness rate in the future, but perhaps they will - after all if a site doesn't display correctly why should it be indexed, what's the point in a visitor finding it if they can't read it because it's broken?

re>> javascript writing to the body
write a variable ID to the body element and have the one CSS do the work via specificity, that's its job anyway.

7:35 pm on Nov 22, 2006 (gmt 0)

Full Member

10+ Year Member

joined:July 21, 2005
posts:213
votes: 0


Im a little unclear as to the purpose of the experiment?

It's purpose is to visually optmise a page for the 3 major screen sizes.

Are you thinking creating these types of erros can help rankings in any particular engine?

Is writing <link rel="stylesheet"... to the body really an error? When CSS came out textbooks said it could be done. A more strict protocol (or whatever) has been developed since, but SEs honour backward compatibility.

Personally, I'm amazed to see big corporate sites being optimized for 800*600, so that 85% of surfers see a miniature webpage. But do they validate? Oh yeah....

to rely on error recovery routines is IMO asking for trouble, While it is not always necessary to have a perfectly valid site, a sites document structure is its foundation. If that foundation is unstable you should expect that it could fall down in some circumstances.

I've never seen it fall down in any browser and I have <noscript> tags for the SEs. I know that some webmasters won't use javascript because they think it will harm their ranking. Then I wouldn't advise using Adsense either.

The question is: who are we writing html for? For the user or for the validator? The user likes to see an optimized page in his/her screen size.
But I belong to, what Microsoft developers refer to with a healthy sense of disdain, the visually oriented.

What is the future of html? More strictness and a regression to HTML3? Or more technical possibilities to enable a more mature experience on the net for the user? I'm not married to my solution of the screen size problem and would welcome one that validates.

after all if a site doesn't display correctly why should it be indexed, what's the point in a visitor finding it if they can't read it because it's broken

It does display correctly, I just mentioned it as an example of something that works but doesn't validate.

re>> javascript writing to the body
write a variable ID to the body element and have the one CSS do the work via specificity, that's its job anyway.

I have tried that, but it's much more difficult to maintain, with all the variables scattered across the body and it seemed to me (I haven't rigorously tested it) that it has a limit. Too much of it will cause it to fail.
Thanks for your suggestion.
7:48 pm on Nov 22, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


No there is no need for stuff "scattered everywhere".

The suggestion was for the body element itself, as in: <body id="$1">

Next a set of CSS rules would be created for each value that $1 could have.

8:28 pm on Nov 22, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:June 12, 2003
posts:725
votes: 0


Sounds like Google's error recovery routines have forgiven you.

While the discussion has evolved somewhat, I wanted to go back to what Ted mentioned before. The Error Recovery Routines. This often makes "tests" invalid and incorrect assumptions made on Google's algo.

I don't see the need for doing a test like this, as it will prove to be worthless as it is without merit.

Cheers,

CaboWabo

BTW Ted, your session on One Page Wonders made the set worth going to.

9:46 pm on Nov 22, 2006 (gmt 0)

Full Member

10+ Year Member

joined:July 21, 2005
posts:213
votes: 0


No there is no need for stuff "scattered everywhere".
The suggestion was for the body element itself, as in: <body id="$1">

Next a set of CSS rules would be created for each value that $1 could have.


That's cool, but I'm not familiar with "$" in javascript. Maybe you are referring to a PHP variable, but PHP can't detect screen size.

[edited by: Martin40 at 9:55 pm (utc) on Nov. 22, 2006]

9:59 pm on Nov 22, 2006 (gmt 0)

Senior Member

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:July 3, 2002
posts:18903
votes: 0


Yes I over-simplified things. The javascript writes the value for $1 and the CSS uses that value to select which bit of the CSS file applies this time.
11:01 pm on Nov 22, 2006 (gmt 0)

Full Member

10+ Year Member

joined:July 21, 2005
posts:213
votes: 0


Maybe the next version of CSS will give us something to solve this gracefully.

[edited by: Martin40 at 11:05 pm (utc) on Nov. 22, 2006]

1:37 am on Nov 23, 2006 (gmt 0)

Full Member

joined:Dec 1, 2003
posts:281
votes: 0


Wow, I am not sure of the point of this whole thing but I have one question... what was in the header of the page that had incorrect nesting of <title>. Just to confirm something was it just "html"?