HTML and CSS Reference
In-Depth Information
stroke-linecap=”square”
stroke-miterlimit=”10”
xmlns=”http://www.w3.org/2000/svg”
xmlns:xlink=”http://www.w3.org/1999/xlink”>
<path
d=”M240 148L298 148L316 96L334 148L392 148L345
180L363 232L316 200L269 232L287 180Z”
fill-rule=”nonzero”
fill=”#ff9900”
stroke=”#ff0000”
stroke-width=”2.0”
stroke-linejoin=”round”
stroke-linecap=”butt”>
</path></svg>
If you want to change the fill color inside of the star, you only
need to change the value of the fill property to a new color. Say
you would prefer a red star; simply change the fill value to red, as
follows:
fill=red
Figure 3.6 shows that the star is now red.
Allowing the browser to control the color, shape, and visual
elements of the SVG image allows you to write programs that
dynamically control the SVG illustrations.
SVG comes with some fundamental benefits:
• Imagesscaleeasily.
• SVGisaccessible.
• Search engines can easily read and understand SVG
images.
These benefits make using SVG very compelling.
Figure 3.6 Any element used to build an SVG drawing can be easily edited.
Search WWH ::




Custom Search