...

View Full Version : 10 Validation Errors?



noneforit
05-20-2009, 11:17 AM
Hello

Now im starting another website from scratch but I have uploaded a temporary page in the mean time. The CSS only has a background colour for the body, a border and some font adjustment etc.

According to the HTML validator I have 10 errors already!!

I really dont get why??

Website is:

http://www.noneforit.com/

http://validator.w3.org/check?uri=www.noneforit.com%2Findex.html&charset=(detect+automatically)&doctype=Inline&group=0

Any suggestions

VIPStephan
05-20-2009, 11:33 AM
Line 3, Column 6: document type does not allow element "head" here; assuming missing "html" start-tag

Pretty obvious isn’t it?



Line 3, Column 1: Missing xmlns attribute for element html. The value should be: http://www.w3.org/1999/xhtml

<head>

Many Document Types based on XML need a mandatory xmlns="" on the root element. For example, the root element for XHTML will look like:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">


What’s unclear about that?


Line 5, Column 75: end tag for "meta" omitted, but OMITTAG NO was specified

This means that you haven’t closed the element properly. In XHTML all elements must be closed. Those with no natural closing tag such as <img> or <meta> must be closed with a slash like so: <img … /> <meta … />


Line 17, Column 8: end tag for "html" omitted, but OMITTAG NO was specified

As you forgot your opening tag, the closing tag is missing as well.

noneforit
05-20-2009, 12:58 PM
Its only clear if you have come across it before.

Whilst I appreciate your help, not everyone here is a HTML expert, in fact most members are likely to be novices.

I have closed both meta tags with <meta../> and now I get another validation error. I have added <HTML> to the start (which I was told not to do by another member as it throws IE int quirks mode apparantly?) and Have tried adding the following line to the <HTML tag but this complained about something else?

xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

abduraooft
05-20-2009, 01:01 PM
Tags like meta,link,img etc are specials and need to be self closed like

<meta http-equiv="Content-Language" content="en-gb" />
<link type="text/css" rel="stylesheet" media="all" href="temp.css" />

noneforit
05-20-2009, 01:19 PM
Excellent. Thank you for your help. Very much appreciated :)

VIPStephan
05-21-2009, 01:51 AM
Whilst I appreciate your help, not everyone here is a HTML expert, in fact most members are likely to be novices.


I’m not intending to be an a** but that’s why the validator tells us exactly what’s wrong with the code. Sometimes it can be a little cryptical because it sees an error where actually the error ocurred somewhere else but in the first two cases the ability to read (and a little logic skills) is the only thing one needs to understand what to do.



I have closed both meta tags with <meta../> and now I get another validation error.


I’m sorry, when I wrote <meta … /> the horizontal ellipsis was actually a placeholder for potential other attributes (as they appear in meta elements naturally) and not meant to be written literally.



I have added <HTML> to the start (which I was told not to do by another member as it throws IE int quirks mode apparantly?) and Have tried adding the following line to the <HTML tag but this complained about something else?

xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">


It’s not the html element that throws IE into quirks mode, it’s the absence of a proper doctype (on the very first line of the document).
In XHTML all elements must be written lowecase so <HTML> won’t work if you’ve actually written it like that, it must read <html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum