Note: This site is currently "Under construction". I'm migrating to a new version of my site building software. Lots of things are in a state of disrepair as a result (for example, footnote links aren't working). It's all part of the process of building in public. Most things should still be readable though.

Use CSS To Style A SVG

HTML

<svg version="1.1" width="200" height="200" xmlns="http://www.w3.org/2000/svg">
  <rect class="svgRect" width="100%" height="100%" />
</svg>

CSS

.svgRect {
  fill: goldenrod;
}