开发者

html page parsing error, head moved into body

I have this html file which is not getting parsed correctly by any browser - the head ends up in the body!

http://oiseanach.org/temp/Title.htm

Both the Google Chrome and Firebug inspectors show some < > converted to HTML entities... I am not sure why?

Validation has the same problem with parsing: ends up in the body etc.

http://validator.w3.org/check?uri=http%3A%2F%2Foiseanach.org%2Ftemp%2FTitle.htm&charset=%28detect+automatically%29&doctype=Inline&group=0

I thought it might be some stray non-printable characters, but I cannot find anything that would be tripping out the parser. The file encoding is UTF-8, specified as UTF-8 in the HTML. Not a JS issue as it is the same with scripts disabled.

Any ideas what could be causing it to come out开发者_高级运维 mangled?


You close your head on the second line, no wonder browsers try to guess what you actually ment.


The head tag only contains a meta tag for the content type. You have put everything else in the body, it's not something that the browser does.


Your page is malformed. Meta and title tags go in the head section, not the body.

  <html>
  <head>
    <title>Your title here</title>
    <meta name="name goes here" value="correct location of a meta tag (in the head)">
  </head>
  <body>
    <meta name="bad" value="wrong location of a meta tag (in the body)">
    <title>Wrong location of the title tag</title>
  </body>
  </html>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜