Forum Moderators: open
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
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.
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.
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.