O'Reilly logo

Sams Teach Yourself SVG in 24 Hours by Micah Laaker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Annotating Documents

Another method of commenting your code involves the title and desc elements. The title and desc elements allow developers to provide descriptive text on both a document and object level. Similar to the comment, the title and desc elements can accept plain text content between their tags. These two elements, though not required, are encouraged for several reasons.

  • Other developers, upon examining your code, will be able to discern a greater amount of context for your document.

  • Some SVG viewers will use title element content as “tool-tip” text, meaning that when a user's cursor is over an object with a title element, the title element's contents display in a box above the content.

  • By providing your document and elements with ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required