...

View Full Version : Speaking of validation...



Echos
12-08-2005, 09:24 PM
I've found it quite entertaining reading the long thread on validation, always helpful? But I've found myself stuck with my own page. Yes, it has 12 errors and yes I know what's wrong with the bottom 11. (I'm messing around with PHP, thus the $). But the first error I'm kinda stumped on. Here's what W3C markup validation service gave me.
----------------
Error Line 13, column 86: end tag for element "LINK" which is not open .
...ss" href="styles/thwarted.css"></link>
The Validator found an end tag for the above element, but that element is not currently open. This is often caused by a leftover end tag from an element that was removed during editing, or by an implicitly closed element (if you have an error related to an element being used where it is not allowed, this is almost certainly the case). In the latter case this error will disappear as soon as you fix the original problem.
----------------

But here is the line it's referring to:


<link id="thislink" rel="stylesheet" type="text/css" href="styles/thwarted.css"></link>

Any suggestions on why this line doesn't validate?

BTW, the page is:
http://www.rustipher.com/~loni/thwarted.php

_Aerospace_Eng_
12-08-2005, 09:28 PM
In HTML the link tag has no closing tag, in XHTML it is self closing /> Remove the </link> and it should validate. Also your doctype isn't valid. Change it to this instead.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

Echos
12-09-2005, 01:02 AM
But then won't my div sizes be off? The reason why I chose the strict doctype is because my div sizes were bigger in fire fox than in IE

oh, and when I do self closing, it give me an error saying that I never had an opening tag for </head> and that <body> is in an invalid position.

Echos
12-09-2005, 01:15 AM
Oops, my divs are fine...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum