2015-01-20, 2:55, John wrote:

I got this error while running my contact page through the validator.
The contact form works fine, but I don’t know what this error means.
Validator cites line 230, yet the style.css is called on line 13!
– –
http://pastebin.com/B9zSx0ew <http://pastebin.com/B9zSx0ew>

When I submit a copy of the code to http://validator.w3.org I get the error message as relating to line 234. That line contains the start tag of a style element: <style type="text/css">.

By HTML rules, a style element may appear only in the head part. In practice, browsers appear it inside the body element as well, with no difference in effect. This explains why the page works.

To make it valid, move the style element at the end of the head part, right before </head>. This ensures that its effect is not changed. As such, the style element may be placed anywhere inside the head element. But the placement may affect the CSS cascade: in a conflict between CSS rules applying to an element, other things being equal, the latter declaration wins.

Yucca





______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to