Error in DOCTYPE declaration

I get the following error (the only one also) when i try to validate my XHTML document:

Line 3, column 2:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""http:// ...
Error: "DOCTYPE" declaration not allowed in instance

I copied that line from the W3C Recommendation chapter 3.1.1

How does I fix that problem.

My code:

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN""" />
<html xmlns="" xml:lang="en" lang="en" />


Thank you for any help!


Remove the first ‘<html>’

Thank you Indian!
Now it works.

Seems that I need to read up on the syntax on these document declaration. :smiley:


This article educated me on ‘doctypes’:



I add it to my “need to read” list.

I’ve to concentrate on my exams now. :frowning:


You’re very welcome Helge.

Good luck with the exams!!! :tup: