Author Topic: XHTML error  (Read 1530 times)

Offline aznetcowboy

  • Full Member
  • ***
  • Posts: 73
    • El Gheko Neighborhood Weather Station
XHTML error
« on: May 13, 2013, 11:55:18 PM »
I am getting the following erro when doing an XHTM validate (http://validator.w3.org/check?uri=http%3a%2f%2fwww.elgheko.us%2findex.htm). Note the red >:
  • Error Line 24, Column 17: document type does not allow element "a" here; missing one of "th", "td" start-tag
                   <a href="#">El Gheko Neighborhood Weather Station</a>
      The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.
    One possible cause for this message is that you have attempted to put a block-level element (such as "<p>" or "<table>") inside an inline element (such as "<a>", "<span>", or "<font>").
Any idea what this error is or what is causing it. It is the code from Weather Blues V1, indexT.htm is "<a href="#"><#location></a>".  The header is:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns=""> <head> <meta http-equiv="" content="" />


Tom


Offline Mr.Meteo

  • Administrator
  • Hero Member
  • *****
  • Posts: 1120
    • http://www.meteostours.ca
Re: XHTML error
« Reply #1 on: May 14, 2013, 06:54:36 AM »
Hi Tom,

This error meen that the command you're using couldn't be used alone.
The right way to use it is:

<p><a href...></a></p>

If you put an <a....> alone, things will be displayed ok, as it is a common error,
but the error is there when we try to validate.

Hope this help!

Regards,
Jacques
Please, consider supporting this site