Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS can’t decipher validation errors

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #24417
    droll13
    Member

    I’m a relative newcomer, trying to redesign my Art League’s website.

    I’m early in the redesign, and validate often. Recently got validation errors and can’t spot what is wrong or decipher what the W3C validator is trying to tell me. Can anyone explain what these error messages are saying?

    Here are the validation errors:

    (1) Line 7, Column 77: end tag for "link" omitted, but OMITTAG NO was specified.

    _menu.css" media="all" rel="stylesheet">

    Here is my entire line 7:

    Code:

    You may have neglected to close an element, or perhaps you meant to "self-close" an element, that is, ending it with "/>" instead of ">"

    (2) Line 9, Column 7: XML Parsing Error: Opening and ending tag mismatch: link line 7 and head.

    </head>

    Here is the entire line 9:

    Code:

    (3) Line 110, Column 7: XML Parsing Error: Opening and ending tag mismatch: head line 3 and html.

    </html>

    Here is the entire line 110:

    Code:

    (4) Line 110, Column 7: XML Parsing Error: Premature end of data in tag html line 2.

    </html>

    see above for line 110

    The strange thing is that the page validated, then later generated these errors even though I hadn’t changed any code.

    Oh, I’m using XHTML 1.0 Strict; the DOCTYPE and other code above and in the <head> follows:

    Code:



    2 Column Liquid CSS Layout – from the “Stylin’ with CSS” Stylib library

    Thanks

    #54811
    TheDoc
    Member

    Hi Dave, welcome to the forums.

    Your error is an easy one, and something that is often overlooked by people that are new to the Strict Doctype.

    Simply close out your link element like so:

    <link href="./styles/import_2liq_text_menu.css" media="all" rel="stylesheet" />

    Note the slash at the end before the closing bracket. This is required in the strict doctype. Things like <img />, <br />, <hr />, to name a few, require that "closing" slash.

    This may also clear up all of the other errors on the page!

    #54812
    Rob MacKay
    Participant

    the Doc is of course absolutly right, you have to close all tags in Strict… its da law. :)

    #55347
    droll13
    Member

    Thanks Doc (and Rob), Yes, it did eiminate the other errors. What a relief! It was driving me nuts, and I didn’t find the "explanations" from the W3C validator very illuminating.

    BTW, I’m glad I stumbled across this site. Not just for the speedy and effective help with problems, but also for all the other goodies here. Some great articles, videos, and demos. I’ve bookmarked it and will return frequently.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The forum ‘CSS’ is closed to new topics and replies.