Forum Moderators: open

Message Too Old, No Replies

Closing tags and indexing detection

         

2_much

6:12 pm on Sep 29, 2000 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi, I have a very basic question that maybe someone can help me out with...

When writing the HTML code...

What problems may occur if you do not close tags such as </H1> ? Would it cause a problem with the Robots or any problems that would make it undetectable for the search
engines. This doesn't affect the layout of the page, so my only concern would be that the spider would be unable to read it if the tag is not closed.

Thank you!
2M

rcjordan

6:25 pm on Sep 29, 2000 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



>This doesn't affect the layout of the page
It will in some browsers. IE is the most tolerant, NS may have problems.

I don't know of any affect on the SE's

drbill

8:02 pm on Sep 30, 2000 (gmt 0)

10+ Year Member



I have yet to hear of a Spider that critique's html code.. I really have never been droped or not listed for bad html code..

engine

8:56 pm on Sep 30, 2000 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



IMO. If you don't close the h1, the spider will see what follows as all h1 text, until it reaches a new code it recognises, like <h2>, etc.

If this is the case, it'll think the text is part of the body copy to be indexed and it may affect your optimisation.

It's good practice to close the coding correctly, mainly for the web browser control.

tedster

8:58 pm on Sep 30, 2000 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



In order to get around nesting issues (closing tags in the reverse order of the way they were opened) many browsers logically convert ANY closing tag to the one they expect to see.

As an example, take this line of code:

<b><font size=-1><i>Text text text text</font></b>

Many browsers will read the close font tag as if it were a close ITALICS tag, and the close bold tag as if it were the close FONT tag. In this code, the browser logic will still be waiting for a close BOLD tag -- which you think you have already written.

Depending on the specific code, this can give very odd results.

Browser logic is necessarily a bit more complex than this example shows. For instance, if a close TD tag is read, then all the tags that were opened inside that table cell are also logically considered closed by the browser, whether you included the actual code to close those tags or not.

If you are using CSS with absolute positioning, leaving tags open can really wreak havoc in some versions of Netscape and cause the page to display partially, or with the divs overlapping each other.

The best bet is to use an HTML validator and close all tags in the proper order. You can really slip through the looking glass if you don't.

I don't see how a spider would have trouble grabbing the page, but if the algorithm is written to give extra weight to words in H tags, you might have problems weighting the keywords the way you intended. If you don't close the H tag within the actual code, the extra weight for your intended keywords may be diluted, in the manner engine describes above.

However, the logic of the algo may not even be written to register an H tag without a closing H tag -- it might be written to disregard such information. Since the algo doesn't need to render the page, but just rank it, that would be a simpler solution.

Brett_Tabke

7:10 am on Oct 3, 2000 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Most of the spiders are more forgiving on html issues than they used to be. I've been a victim of se banishment because of a bad template a few years ago (early 98).

Unclosed tags - mostly they get ignored. I have actually tried the unclosed h1 trick, and it doesn't work. Even if you try it around a whole paragraph. SE's are slowly knocking off the bold and h1 tag preferences as they realize most of the net is onto them.

2_much

5:11 pm on Oct 3, 2000 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thank you very much for your responses.

I decided against leaving the tag open. If a "trick" jeopardizes the design and quality of a page in any way, then it isn't worthwhile, in my opinion.

So thanks for your guidance in this matter!
2M

Brett_Tabke

7:54 am on Oct 10, 2000 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



Ummm, Google just munched a short test page with an unclosed h1 - we'll see and I'll report back.