Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > valid html and css

Reply
Thread Tools

valid html and css

 
 
dorayme
Guest
Posts: n/a
 
      02-16-2005
When I validate my css at http://jigsaw.w3.org/css-validator/validator, I
can get "No error or warning found" but i am a bit puzzled by what the words
following mean:

"To work as intended, your CSS style sheet needs a correct document parse
tree. This means you should use valid HTML."

The css? This is not html? As for the html files that the css control, of
course they should be valid...? My css sheets are pretty plain getting
straight down to business with the tags:

body {

}

and so on. Should there be further headers and footers (in html there's
<head> and <body> and <html> and meta tags and stuff.

My sheets seem to work ok but need to get this really right...

Anyone?


dorayme

 
Reply With Quote
 
 
 
 
Steve Greenaway
Guest
Posts: n/a
 
      02-16-2005
Kermit the Frog stuck a mic in dorayme's face, who said:
>When I validate my css at http://jigsaw.w3.org/css-validator/validator, I
>can get "No error or warning found" but i am a bit puzzled by what the words
>following mean:


>"To work as intended, your CSS style sheet needs a correct document parse
>tree. This means you should use valid HTML."


>The css? This is not html? As for the html files that the css control, of
>course they should be valid...? My css sheets are pretty plain getting
>straight down to business with the tags:


Don't sweat it. The CSS validator looks at your CSS file, and nothing
else. It has no idea which html documents on the world wide webby
are linking to it, but it still gives a friendly reminder to keep the
html docs in good shape.

--
- Steve
"I think a good friend would recommend CLR to all his friends."
 
Reply With Quote
 
 
 
 
dorayme
Guest
Posts: n/a
 
      02-16-2005


> From: Steve Greenaway <(E-Mail Removed)>
> Organization: Carleton University, Ottawa, Canada
> Newsgroups: alt.html
> Date: 16 Feb 2005 06:31:42 GMT
> Subject: Re: valid html and css
>
> Kermit the Frog stuck a mic in dorayme's face, who said:
>> When I validate my css at http://jigsaw.w3.org/css-validator/validator, I
>> can get "No error or warning found" but i am a bit puzzled by what the words
>> following mean:

>
>> "To work as intended, your CSS style sheet needs a correct document parse
>> tree. This means you should use valid HTML."

>
>> The css? This is not html? As for the html files that the css control, of
>> course they should be valid...? My css sheets are pretty plain getting
>> straight down to business with the tags:

>
> Don't sweat it. The CSS validator looks at your CSS file, and nothing
> else. It has no idea which html documents on the world wide webby
> are linking to it, but it still gives a friendly reminder to keep the
> html docs in good shape.
>
> --
> - Steve
> "I think a good friend would recommend CLR to all his friends."



OK, thanks, Steve. So the interpretation is: "Make sure your html files are
good or your css won't have the effect you expect...". Not, "the css itself
needs some parse tree thingy to work..."

dorayme

 
Reply With Quote
 
Richard
Guest
Posts: n/a
 
      02-17-2005
On Wed, 16 Feb 2005 15:16:07 +1100 dorayme wrote:

> When I validate my css at http://jigsaw.w3.org/css-validator/validator,
> I
> can get "No error or warning found" but i am a bit puzzled by what the
> words
> following mean:


> "To work as intended, your CSS style sheet needs a correct document
> parse
> tree. This means you should use valid HTML."


> The css? This is not html? As for the html files that the css control,
> of
> course they should be valid...? My css sheets are pretty plain getting
> straight down to business with the tags:


What they should say is, "To validate your html part use validator.w3.org."
Intstead of the BS $10 words like "parse tree".

If parse means to cut, then why would I want to cut down the tree?


 
Reply With Quote
 
Nik Coughin
Guest
Posts: n/a
 
      02-17-2005
Richard wrote:
>
> What they should say is, "To validate your html part use
> validator.w3.org." Intstead of the BS $10 words like "parse tree".
>
> If parse means to cut, then why would I want to cut down the tree?


Well, it's a moot point really because parse does not mean "to cut".

http://en.wikipedia.org/wiki/Parsing
http://www.pcwebopedia.com/TERM/P/parse.htm
http://dictionary.reference.com/search?q=parse
http://www.answers.com/parse&r=67


 
Reply With Quote
 
Jukka K. Korpela
Guest
Posts: n/a
 
      02-17-2005
dorayme <(E-Mail Removed)> wrote:

> When I validate my css at http://jigsaw.w3.org/css-validator/validator,


then you aren't really using a validator, but a (useful) checker, which is
misleadingly called "CSS Validator".

> I can get "No error or warning found" but i am a bit puzzled by what
> the words following mean:
>
> "To work as intended, your CSS style sheet needs a correct document
> parse tree. This means you should use valid HTML."


They mean that the authors of the checker wanted to make some general
propaganda in favor of "valid HTML". It has nothing specific to do with
your HTML or SGML or XML document, if any.

> The css? This is not html? As for the html files that the css control,
> of course they should be valid...?


It wouldn't hurt. Whether markup errors really matter depends on the
browser. It is incorrect to give the impression that CSS could never work
with invalid markup. Unfortunately most HTML documents around are invalid -
but they may still work with CSS.

> My css sheets are pretty plain
> getting straight down to business with the tags:
>
> body {
>
> }
>
> and so on.


So I guess you are using XML with "body" as the root element's name?
Nothing wrong with that, as long as you know what you are doing with XML
in the first place.

> Should there be further headers and footers (in html there's
> <head> and <body> and <html> and meta tags and stuff.


If you play with XML and CSS, then there is no particular reason to imitate
HTML syntax.

Your XML needs to be "well-formed" in order to be processed properly at
all. You could also make it valid, i.e. find or write a Document Type
Definition, stick to it, and declare using it. But validity is by no means
needed for making CSS work with CSS. Still less do you need to try to make
your XML valid HTML (i.e., XHTML), unless you want to make your document
work on HTML user agents, "browsers", in HTML mode (with default renderings
for many elements, etc.).

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Newbie - CSS Works With Invalid DOCTYPE. Fails With Valid DOCTYPE. Larry Lindstrom HTML 19 06-12-2012 02:07 PM
Looking for (X)HTML/CSS valid web sites Andrea HTML 43 05-10-2005 12:04 PM
confused - html validates, css validates but validate css from the html causes errors Titus A Ducksass - AKA broken-record HTML 6 11-15-2004 12:59 PM
IE problems on a site which has both valid css and xhtml Paul F. Johnson HTML 5 02-21-2004 01:07 PM
icons for valid css and html tom watson HTML 13 09-17-2003 09:56 AM



Advertisments