Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8358127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:42:06+00:00 2026-06-09T10:42:06+00:00

I am trying to validate my code using w3c-validator Encoding: utf-8 Doctype:XHTML 1.0 Frameset

  • 0

I am trying to validate my code using w3c-validator
Encoding: utf-8
Doctype:XHTML 1.0 Frameset

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">  
<html xmlns="http://www.w3.org/1999/xhtml">  
  <head>  
    <title>Openfire Archived IM content Search</title>  
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />  
  </head>  
  <body>  
    <p>  
        <!--The following javascript function re-directis the user to the same page-->
        <script type="text/javascript">  
        function startover(){  
            window.location="http://localhost/openfireIMsearch/index.php"  
        }  
        </script>

<!--html form for start-over button. The javascript function startover() is called when the user clicks this button-->
        <form method="get" action= "index.php" name = "re-login">
            <input type = "button" value ="Start Over" onclick = "startover()" />
            <input type = "hidden" name = "re-login-hidden" value ="re-login-on" />
        </form>  
    </p>
  </body>
</html>

I am getting the following error which I have no clue about:

Line 7, Column 6: document type does not allow element “body” here
✉ The element named above was found in a context where it is
not allowed. This could mean that you have incorrectly nested elements
— such as a “style” element in the “body” section instead of inside “head” — or two elements that overlap (which is not allowed). One
common cause for this error is the use of XHTML syntax in HTML
documents. Due to HTML’s rules of implicitly closed elements, this
error can create cascading effects. For instance, using XHTML’s
“self-closing” tags for “meta” and “link” in the “head” section of a
HTML document may cause the parser to infer the end of the “head”
section and the beginning of the “body” section (where “link” and
“meta” are not allowed; hence the reported error).

Error message seems to indicate that one reason could be my use of meta tag. But the doctype clearly indicates that the document is XHTML and not HTML. I am at loss here. Could anybody shed some light? Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T10:42:08+00:00Added an answer on June 9, 2026 at 10:42 am

    Your doctype seems to be telling me that it is a frameset. This would make body tags illegal and you would instead expect to have a frameset instead. Its a while since I’ve done any frames though so I might be misremembering that.

    And in case its not obvious the solution would be to find the correct doctype. Something like:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    

    http://www.w3.org/QA/2002/04/valid-dtd-list.html seems to have a list to choose from (and is where I copied the above from).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a XHTML-file using the following doctype-definition: `<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0
<!DOCTYPE html PUBLIC -//W3C//DTD XHTML 1.0 Transitional//EN http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd> <html xmlns=http://www.w3.org/1999/xhtml> <head> <title>Validation POC</title> <script
I am trying to validate an html form using javascript the code is bellow
i am trying to validate someone else's code here and they are using the
i am trying to validate a form text box using jquery validator, it works
I'm using the PHP form builder class ( http://code.google.com/p/php-form-builder-class /) and i'm trying to
Hi I am trying to validate an email using regular expresions.This is my code:
I'm trying to validate user input data using jquery. Here is the code I
I am using jQuery Validator to validate user input. I am trying to figure
I've been trying to validate my code to calculate Mahalanobis distance written in Python

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.