How to solve this error "The element type "head" must be terminated > by the matching end-tag "</head>"?

39,449

I think that these two lines are part of the problem:

<script src="js/jquery-1.3.2.min.js" type="text/javascript"/></script>
<script src="js/dropdown.js" type="text/javascript"/></script>

Since this is XHTML (according to the DOCTYPE), you can either change "/>" to ">", or delete the "</script>".

This illustrates the kind of problems you have trying to extract stuff from real-world HTML. If that is what you are doing, maybe you should be using HTMLTidy or a similar "permissive" HTML parser rather than a strict parser.

Share:
39,449
Jitendra Vyas
Author by

Jitendra Vyas

Hi, I am Jitendra a front-end developer from India specializing in web standards, accessibility, and usability based development.

Updated on December 14, 2020

Comments

  • Jitendra Vyas
    Jitendra Vyas over 3 years

    Why i'm getting this error

    Using org.apache.xerces.parsers.SAXParser Exception net.sf.saxon.trans.XPathException: org.xml.sax.SAXParseException: The element type "head" must be terminated by the matching end-tag "". org.xml.sax.SAXParseException: The element type "head" must be terminated by the matching end-tag "".

    When i check this site http://visaraimpex.com/ in http://www.w3.org/2003/12/semantic-extractor.html