What causes "Lexical error" messages using The W3C CSS Validation Service?
I'm trying to validate my style sheet programming using The W3C CSS Validation Service:
It's giving the following error message
It's in this part of the code apparently:
Lexical error at line 1, column 3. Encountered: "D" (68), after : "<!"
Can anybody see what's causing the error?
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
That's HTML, not CSS. Is that the problem?
that's what you want
validate your CSS with a CSS validator
Thanks for responding. I appreciate the input.
What I'm trying to do is validate the CSS. I figured out what was causing the error message. I was copying and pasting all of the Html, instead of just the CSS, from the web page source code into the validator.
This page says "Enter the CSS you would like validated:"
You can run the whole web page through the CSS validator. But you have got to use this page:
I had been working all day yesterday when I made the post. I must have been a little skull numb when I asked the question at the start of this thread. Sorry for the trouble.
It seems, according to katsarov, that the problem was caused by invalid characters in the source file. These are often caused by using a word processor to edit the code. Use a text editor. By the way, the reason I deleted katsarov's post was because it contained a link to a .biz site.
Which along with leveraging caching models, using HTML for what HTML is for, and targeting multiple media and devices with CSS, is why CSS has NO BLASTED BUSINESS in the HTML in the first place.
Originally Posted by KnoxVol
... which is why I say the STYLE tag should be obsoleted and removed from the specification entirely, and why the STYLE attribute should be deprecated for all but the narrowest of corner case uses (like when style actually conveys data, like width or height on a graph built with DIV).
99% of the time, if you have STYLE, saying what things look like in your HTML, you're doing it all wrong!
EVEN IN TESTING. I really don't get how some people make claims like "it's easier" on that...
here you will see CSS with a CSS validator.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)