About This HTML Issue
A <style> element's type attribute can only be text/css, and since that is already the default, the cleanest fix is to delete the attribute.
The validator reports this error for any other value: a made-up MIME type such as text/stylesheet, a bare css, a preprocessor type such as text/less or text/scss, text/css with a parameter (text/css; charset=utf-8), or an empty type="". The value text/css itself, in any letter case, only gets the milder warning that the attribute is unnecessary.
The error is more than cosmetic. The HTML standard tells browsers to skip a <style> block whose type is present and is neither empty nor text/css, so the rules inside may never apply and the page renders without them. Older templates and CMS themes often carry these values from the HTML 4 era, when type was required and not every author knew the right MIME type.
If the block holds Less or Sass for a client-side compiler, compile it to CSS at build time and serve plain CSS instead. A <style> element only ever holds CSS.
Invalid example
<head>
<meta charset="utf-8">
<title>Opening hours</title>
<style type="text/stylesheet">
.notice {
color: #8a1c1c;
}
</style>
</head>
Valid example
<head>
<meta charset="utf-8">
<title>Opening hours</title>
<style>
.notice {
color: #8a1c1c;
}
</style>
</head>
Find issues like this automatically
Rocket Validator scans thousands of pages in seconds, detecting HTML issues across your entire site.