Q&A

Q1:HTML allows both all-caps and lowercase tag names. Why doesn't SVG?
A1: SVG is a subset of XML. XML tags are case sensitive, as developers may define two separate meanings for a tag with different letter cases.
Q2:Do I have to use the W3C's DTD? Can I use someone else's? Can I write my own?
A2: You are in no way limited to using the W3C's SVG DTD. The W3C DTD is obviously the purest DTD available but may not have some additions that you need for your unique application. If you do not wish to depend on a connection to the W3C site, you can download the DTD and use it locally (whether on your site or your machine); just make sure you change the URL of the DTD to match your new location.
Q3:Do I need to use an id attribute on every element? ...

Get Sams Teach Yourself SVG in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.