Forum Moderators: open

Message Too Old, No Replies

validate CSS 3 with HTML 4.01 strict

help with validating CSS 3 and HTML 4 Strict

         

jollymoon

11:09 pm on Mar 27, 2009 (gmt 0)

10+ Year Member



Never can tell?

A couple of days ago I built a new webpage and as usual tried to validate my HTML 4 strict and CSS 3 . The HTML4 validated just great with CSS2.1, but threw a tantrum when I posted the CSS3 validation code and reran HTML4 Strict.

This is the offending line:

&profile=css3&usermedium=all&warning=1

which is OK on the CSS validation page, but will not pass inspection if ran AFTER posting the WHOLE link to my web page. Everything is the same except for that last line.

Run as CSS2.1 (with " & ") and all is well.

Run as CSS3 and the validator gives 6 errors on this part of the code alone. It seems to hate the " & " and the " = " and even the " W " in warning? !

Would like to validate HTML 4.01 Strict with CSS3.

Any help?

-------------------------------------------------------------------
SEEMS I FOUND MY OWN ANSWER
-------------------------------------------------------------------
FROM:

[htmlhelp.com...]

Another common error occurs when including a URL which contains an ampersand ("&"):

<!-- This is invalid! --> <a href="foo.cgi?chapter=1&section=2&copy=3&lang=en">...</a>

This example generates an error for "unknown entity section" because the "&" is assumed to begin an entity reference...

To avoid problems with both validators and browsers, always use &amp; in place of & when writing URLs in HTML

I just wanted to tell a bunch of people so they would not waste 2-3 DAYs trying to figure out their coding for HTML4 transitional, HTML 4 STRICT, CSS 2.1 and CSS3 !

[edited by: tedster at 7:44 pm (utc) on Mar. 28, 2009]
[edit reason] shorten quote - 'fair use' is 4 sentences [/edit]

rocknbil

3:24 pm on Mar 28, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome aboard jollymoon! Sadly, a quick search on this site would have also saved you that frustration, it's a "frequent flier" here! :-)