Steve Krupka
Steve Krupka

Reputation: 1

W3C validator reports "Stray end tag ’html’"

I'm baffled at what could be causing the validator error on this page as there's not a lot on this page. The error is on the <html> tag, I get a "Stray end tag html" message. What's wrong?

http://validator.w3.org/check?uri=www.neurologicclinic.net&charset=%28detect+automatically%29&doctype=Inline&group=0

Upvotes: 0

Views: 9219

Answers (4)

fuzic
fuzic

Reputation: 2522

The <html></html> tags should wrap all of the HTML content, including the head tags.

Upvotes: 1

Markus Deibel
Markus Deibel

Reputation: 1329

You are missing an open <html> tag. It must go before <head>

<!doctype html>
<html>
  <head>
    ...
  </head>
  ...
</html>

Upvotes: 0

Grant Clements
Grant Clements

Reputation: 984

I believe your <html> tag should be defined above the <head> section, not after it.

e.g.

<!DOCTYPE html>
<html>
  <head>
   ..
  </head>
  <body>
  ..
  </body>
</html>

Upvotes: 0

Sirko
Sirko

Reputation: 74046

You open an <html> tag after you already had your <head> section. This is invalid. The general order of those tags is as follows:

<html>
  <head>
  </head>
  <body>
  </body>
</html>

Upvotes: 0

Related Questions