Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Regular Coder noneforit's Avatar
    Join Date
    Apr 2009
    Location
    England
    Posts
    268
    Thanks
    10
    Thanked 20 Times in 20 Posts

    10 Validation Errors?

    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=ww...Inline&group=0

    Any suggestions

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,866
    Thanks
    6
    Thanked 1,029 Times in 1,002 Posts
    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.

  • #3
    Regular Coder noneforit's Avatar
    Join Date
    Apr 2009
    Location
    England
    Posts
    268
    Thanks
    10
    Thanked 20 Times in 20 Posts
    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">

  • #4
    Supreme Master coder! abduraooft's Avatar
    Join Date
    Mar 2007
    Location
    N/A
    Posts
    14,863
    Thanks
    160
    Thanked 2,224 Times in 2,211 Posts
    Tags like meta,link,img etc are specials and need to be self closed like
    Code:
    <meta http-equiv="Content-Language" content="en-gb" />
    <link type="text/css" rel="stylesheet" media="all" href="temp.css" />
    The Dream is not what you see in sleep; Dream is the thing which doesn't let you sleep. --(Dr. APJ. Abdul Kalam)

  • Users who have thanked abduraooft for this post:

    noneforit (05-20-2009)

  • #5
    Regular Coder noneforit's Avatar
    Join Date
    Apr 2009
    Location
    England
    Posts
    268
    Thanks
    10
    Thanked 20 Times in 20 Posts
    Excellent. Thank you for your help. Very much appreciated

  • #6
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,866
    Thanks
    6
    Thanked 1,029 Times in 1,002 Posts
    Quote Originally Posted by laurieballard View Post
    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.

    Quote Originally Posted by laurieballard View Post
    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.

    Quote Originally Posted by laurieballard View Post
    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">
    1. 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).
    2. 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>


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •