Skip navigation
Currently Being Moderated

closing tag error

Nov 14, 2012 3:09 PM

I have an extremely broken page.

 

When I validate it I get a lot of closing tag errors but I don't understand in what way I have not closed them properly as I have not had this issue before.

 

Can anyone help?

 

http://validator.w3.org/check?uri=http%3A%2F%2Fwww.tavcafe.com%2Fevent s.php&charset=%28detect+automatically%29&doctype=Inline&group=0

 
Replies
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Nov 15, 2012 6:36 AM   in reply to Renskins

    <doctype>

    <html>

    <head>

    ......

     

    This is the standard format. Your <meta> tag sits before <head> begins. Fix this first.

     

    Then, your <script> tags do not have a type attribute. It should ideally be

     

    <script type="text/javascript">

    ...

    </script>

    Line 611 - If you want to give an ampersand, your code should have

    &amp;
    not just &. This is invalid markup.

     

    661 - you're missing a <ul> tag before <li> tag. <li> can only be present within a <ol> or <ul> or <menu>... tag.

     

    665 - your <a> tag resides outside of any <li> tags - lots of similar occurences.

     

    Fundamental code error - Lines 869 - 872

     

    <p> <ul>

    <li>肉類綜和盤/Mixed Meat Platter&#8212;&#8212;-$450.NT **<br />

    (去骨雞腿肉.豬肉.小牛排/chicken.pork.steak)</li>

    </ul></li></p>

    Your code is all messed up - incorrect start/ end combinations of tags.

     

    You also have multiple nested span tags within span tags again. This is illegal.

     

    Line 1139

     

    <p><KRG#26 It Sounds Transparent!>

         http://kandalarecords.tw/<br />

    <KRG#26> - This is invalid tag. < character is a tag opener. You cannot have < as a text value. If you want to display < in your webpage, you should use &lt; and &gt; for > sign.

     

     

    First and foremost, clean up your markup. Put your CSS code in a separate CSS file. Link the file in your <head> tag of HTML - you'll save a lot of lines in HTML this way.

     

    Then, apply source formatting to your entire markup code in DW. This way, you can easily trace unclosed/ pre-closed tags.

     

    Message was edited by: Sudarshan Thiagarajan - revise ampersand code which was showing up as blank - on the rich editor!

     
    |
    Mark as:
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Nov 14, 2012 10:54 PM   in reply to Sudarshan Thiagarajan

    Also, if you have a lot of chinese characters, you may want to consider changing your charset.

     

    Look here: http://a4esl.org/c/charset.html

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 15, 2012 5:55 AM   in reply to Sudarshan Thiagarajan

    Your line 611 comment didn't come through - an ampersand should be in your code like this -

     

    &amp;

     
    |
    Mark as:
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Nov 15, 2012 6:37 AM   in reply to MurraySummers

    Thanks for that, Murray. I didn't notice it after I posted the reply.

     

    I've fixed it now.

     
    |
    Mark as:
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Nov 16, 2012 12:15 AM   in reply to Renskins

    Contacting Perch developers/ support is one option I see.

     

    Since you're saying that is where this malfunctioning code is created, there is little we can suggest with hand code.

     

    Or, another alternative, get out of Perch! (I know its easier said than done!)

     
    |
    Mark as:
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Nov 17, 2012 8:32 PM   in reply to Renskins

    <ul> should always precede <li> as a rule of thumb.

     

    <ul>

         <li>

              ....

         </li>

         <li>

              ...

         </li>

    </ul>

    This is what I asked you earlier - but I guess you got confused with the hand written code for something Perch did.

     

    And when you have <ul><li> tags, you can't have <a> tags or any other in between <ul> and <li>. Start your Unordered List first. Then your Line Item. Then put your content within it. You can have multiple <li> within the same <ul> as shown above.

     

    Also, close your <li> tags before closing <ul> tag.

     

    Multiple nested span tags - Having a <span> tag within another <span> tag. While this will validate OK and is allowed within HTML 4 transitional, most modern browsers have a tendency to ignore this markup.

     

    Trust this helps.

     

    -ST

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 18, 2012 4:50 AM   in reply to Sudarshan Thiagarajan

    Multiple nested span tags - Having a <span> tag within another <span> tag. While this will validate OK and is allowed within HTML 4 transitional, most modern browsers have a tendency to ignore this markup.

     

    I believe that is incorrect.  The <span><span>...</span></span> is a perfectly valid construct (as long as there are no block tags within the span tags.  What is your evidence that browsers ignore that?

     
    |
    Mark as:
  • Sudarshan Thiagarajan
    4,000 posts
    Oct 15, 2010
    Currently Being Moderated
    Nov 18, 2012 8:09 AM   in reply to MurraySummers

    Murray, Unfortunately I don't have a documentation containing this. But, I'm fully aware my team has run into issues while doing this for quite a few projects we've worked on so far.

     

    One that I can think of is our proprietary CMS  we hand coded from scratch and the one that we offer exclusively to our clients. We've run into issues with hooking a span within span and parsing data either MSSQL or PGSQL or XML through it to break-up the fetched content within each construct. While most times it is to do with the CSS styling and jQuery targeting into the ID space, some times we've had issues with Mobile browsers (both via simulation as well as actual devices).

     

    After a bit of studying we discovered the reproduction of this varies with the jQuery plug-ins most times and the markup itself many a times (on few browsers - mostly Safari 5.x and FF 3.x)- this is one of the reasons why I cannot give a fixed method to replicate this scenario. But with  what I've tried along with my team in the past, this definitely happens. Haven't tried this on FF 15+ or on Safari 6.x recently though. Actually I'll keep this in mind for letting my team know so they can look up our archives to replicate this on these browsers - just for our learning and curiousity to see if it does work right.

     

    -ST

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points