• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

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?
A3: You do not need to use an id attribute on every element you create in SVG. However, keep in mind that an id attribute not only allows animation and interactive controls to access an object, but it also helps other developers understand your code. By using the id attribute, you provide yourself and others a glimpse into the function of every line of code you author. Keep in mind that what may make sense today may not seem so apparent tomorrow; code accordingly.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint