Does a CSS sheet require a !doctype declaration?

2 answers

danwellman 5600
2
points

no, CSS does not need a DOCTYPE because it is always the same type of document - a stylesheet :)

You should still validate CSS though, use W3C validator

Answered about 8 years ago by danwellman
orta 244
1
point

No, any definitions for stylesheets are done when linking it in the HTML e.g.

    <link rel="stylesheet" href="assets/stylesheets/baseline.compress.css" type="text/css" media="screen" title="Baseline CSS" charset="utf-8">
Answered about 8 years ago by orta