This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 706 - link/style type attribute with parameters
Summary: link/style type attribute with parameters
Status: RESOLVED FIXED
Alias: None
Product: CSSValidator
Classification: Unclassified
Component: HTML4.01 (show other bugs)
Version: CSS Validator
Hardware: Other other
: P4 normal
Target Milestone: ---
Assignee: Philippe Le Hegaret
QA Contact: qa-dev tracking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-05-08 05:39 UTC by Mikael Lind
Modified: 2005-08-29 12:23 UTC (History)
1 user (show)

See Also:


Attachments

Description Mikael Lind 2004-05-08 05:39:30 UTC
The CSS Validator does not pick up stylesheets in HTML pages that specify the 
encoding of the stylesheet. (I get the message "No style sheet found" when 
trying to validate such a page.) In other words, this does not work:

<link rel="stylesheet" type="text/css;charset=UTF-8" href="style.css">

While this does work:

<link rel="stylesheet" type="text/css" href="style.css">

As far as I know, the former is valid HTML, is supported in at least some 
standards-compliant browsers (namely Mozilla and Opera), and is the preferred 
way of specifying the encoding of the stylesheet.
Comment 1 Bj 2004-05-23 15:34:31 UTC
I am not so sure whether what you attempt to do is actually allowed, see 
http://lists.w3.org/Archives/Public/www-html-editor/2004AprJun/0164.html

You should rather use the "charset" attribute on the link element if you
must, e.g. <link charset = utf-8 type = "text/css" href = "..." ...>.
Comment 2 Etan Wexler 2004-10-27 12:56:37 UTC
Regarding comment #0, the preferred way to specify the encoding of a style sheet
is to send the appropriate HTTP or MIME "charset" parameter.
Comment 3 Yves Lafon 2005-08-29 12:23:56 UTC
With the new handling of mime type with the type attribute, it resolves also
this one (even if it may be bad practise).
As always, see http://qa-dev.w3.org:8001/css-validator/