w3c / markup-validator

https://validator.w3.org/
117 stars 34 forks source link

SVG should not require <style type> #46

Open edemaine opened 4 years ago

edemaine commented 4 years ago

The following document produces an error, but I believe it shouldn't.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 300" width="500" height="300" preserveAspectRatio="xMinYMin meet">
  <style>
    * { fill: blue }
  </style>
</svg>

Line 4, Column 9: required attribute "type" not specified in <style> The attribute given above is required for an element that you've used, but you have omitted it. For instance, in most HTML and XHTML document types the "type" attribute is required on the "script" element and the "alt" attribute is required for the "img" element. Typical values for type are type="text/css" for