Jump to content

Validation problems


Recommended Posts

Hi,

I'm trying to validate the following piece as XHTML 1.0 Strict

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>

<body>

<p>
<a href="http://validator.w3.org/">W3C Validator</a>
</p>

<p>
<a href="mailto:War@war.com">Contact</a>
</p>

<p>
<a href="#1">1</a>
</p>

<p>
<a href="#2">2</a>
</p>

<p>
<br />
<br />
<br />
<br />
</p>

<p>
<a name="1"</a>
One
</p>

<p>
<br />
<br />
<br />
<br />
</p>

<p>
<a name="2"</a>
Two
</p>
</body>
</html>

But I get the following errors.

# Error  Line 36 column 11: unclosed start-tag requires SHORTTAG YES.

<a name="1"</a>


# Error Line 48 column 11: unclosed start-tag requires SHORTTAG YES.

<a name="2"</a>

I assume it's some really silly mistake but I just can't seem to figure it out so I'm asking here.

Thanks.

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...