[resolved] HTML validation - "character data is not allowed here" about footer div (4 posts)

  1. JaanMatti
    Posted 3 years ago #

    Hi, I'm trying to validate the HTML at http://borealis.webson.ee - I'm down to my last error, where I dont understand why it's an error:

    Line 124, Column 5: character data is not allowed here
    <div id="footer">

    You have used character data somewhere it is not permitted to appear. Mistakes that can cause this error include:

    putting text directly in the body of the document without wrapping it in a container element (such as a <p>aragraph</p>), or
    forgetting to quote an attribute value (where characters such as "%" and "/" are common, but cannot appear without surrounding quotes), or
    using XHTML-style self-closing tags (such as <meta ... />) in HTML 4.01 or earlier. To fix, remove the extra slash ('/') character. For more information about the reasons for this, see Empty elements in SGML, HTML, XML, and XHTML.

    I'm using a separate footer div inside the body tag. Is that wrong somehow? Or a deprecated behaviour? Maybe someone smarter in XHTML can comment on that.


  2. Digital Raindrops
    Posted 3 years ago #

    Is there comments in the footer file, as the validator does not show these?

    It is likely an illegal character like the hyphon in the comment line '-', I had the same thing in a theme based on the twenty ten theme, the comment is in the Twenty Ten 'Posted On' Function!

    The dash between "post" and "date" is a non-standard hyphen, likely added by Word or some other text formatting program. The code below is clean and would make TwentyTen the first theme I have run through the theme-checker to thoroughly validate.

     * Prints HTML with meta information for the current post-date/time and author.
     * @since Twenty Ten 1.0

    Since it is in a comment block, it would never throw errors.



  3. JaanMatti
    Posted 3 years ago #

    Hi David,

    Thanks, you were right. There were hidden characters in the footer that also didn't show up in notepad++. In my case, it was the Byte Order Mark that Notepad++ automatically inserts when you convert an html document to UTF-8. This automatic inserting has to be ticked off from the menu, but I had created the footer before I did it.

    Thanks again!

  4. Digital Raindrops
    Posted 3 years ago #

    Mark this topic as resolved please.


Topic Closed

This topic has been closed to new replies.

About this Topic