Forum Moderators: open

Message Too Old, No Replies

End tag for a, which is not open? (W3C validator)

         

badams1

4:13 pm on Dec 9, 2004 (gmt 0)

10+ Year Member



I lack one error from being validated and I don't have a clue what to do about it.

Using HTML 4.01 Transitional:
end tag for element "A" which is not open
...0wht.gif" alt="Google" border="0"></a>
----------

well if I remove the </a> it makes everything under it linked to google.

what do I need to do to get it working? thanks.

encyclo

4:17 pm on Dec 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Can you post the relevant block of markup from the start of the section that the link is in up until the point where the error occurs? It will help us better identify the real cause of the error.

badams1

4:33 pm on Dec 9, 2004 (gmt 0)

10+ Year Member



<FORM method=GET action=link />
<a href=link accesskey="g"><img src="logo" alt="Google" border="0">Google</a>
<label for="Google">
<INPUT TYPE=text name=q id="Google" size=31 maxlength=255 value="">
</label>
<INPUT type=submit name=sa VALUE="Search">
<input type=hidden name=domains value="school">
<br>
<label for="searchGoogle">
<input type=radio name=sitesearch id="searchGoogle" value="">
Search Google</label>
<label for="searchschool">
<input type=radio name=sitesearch id="searchschool" value="schoolhere" checked>
Search school</label>

choster

4:48 pm on Dec 9, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Could this be it?

<FORM method=GET action=link />

Try simply <form method="get" action="link"> .

badams1

5:22 pm on Dec 9, 2004 (gmt 0)

10+ Year Member



nope, it still gives me the error.

edit: got it. it was in the:
<a href=link accesskey="g">

due to the link not having the " " around it.

Farix

10:56 pm on Dec 9, 2004 (gmt 0)

10+ Year Member



due to the link not having the " " around it.

All attributes should have quotes around their values. You might want to audit your (X)HTML and make sure that is the case.

tedster

12:10 am on Dec 10, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You can get a sense of how important it is to quote attributes by noticing how difficult it is for a parser to locate the actual source of the error.

The worst ones for me are the ones where I somehow remove a close quote accidently, leaving the quote open - "yes, I know I have an error somewhere, but where on earth could it be." It is common when scanning mark-up to see the open quote on the left and not notice that it has no partner to the right.

I'd love to see the routines that search engines use to handle the tag soup they must deal with every minute. They've got to be making assumptions just to try some elementary level of error-recovery.

Even if you're writing transitional mark-up, I think that quoting all attributes is a very good habit to form.

g1smd

7:24 pm on Dec 25, 2004 (gmt 0)

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



As well as the missing quotes, you had an XHTML style closing / on the <form> tag, but ommitted it from the <img> tag.

Was this document supposed to be HTML 4.01 or XHTML markup. It needs to be edited to be 100% consistent.

yngwin

3:55 pm on Dec 30, 2004 (gmt 0)

10+ Year Member



To spot these kind of errors, it is very helpful to use an editor with syntax highlighting.

As to the question if this is supposed to be XHTML or HTML, I think that is easy to spot. This markup is so far from XML standards, that it can only be like HTML 4.01 Transitional.

badams1

2:20 pm on Jan 13, 2005 (gmt 0)

10+ Year Member



yngwin, if you noticed in my first post I did say HTML 4.01 Transitional.