Despite being a W3C specification since 2001, Scalable Vector Graphics have never received the attention they deserve. Primarily, this is because the majority of web users (using Internet Explorer) are unable to view the images without a plugin.
SVG is an XML-based file format which describes graphic vectors such as lines, paths, boxes, circles, polygons, and text with color, gradients, patterns, opacity etc. Bitmaps can also be embedded within an SVG when necessary.
There are a number of reasons why SVG is ideally suited to the web platform:
1. W3C Standards
SVG is an open standard and developers may use it without restrictions.
2. Image scaling
SVGs can be scaled to any size without incurring pixelation or loss of detail.
3. Smaller file size
Simple images such as logos and charts will generally have a smaller file size than their bitmapped JPG, PNG or GIF equivalent.
4. SVG tools are already available
SVG XML code can be created, verified, manipulated and compressed using a variety of existing tools from Notepad to Inkscape, OpenOffice.org Draw, and Microsoft Visio.
5. Server-side generation
SVG XML can be created and manipulated on the server using PHP, .NET, Python or any other language/framework.
6. Client-side generation
Although the facilities offered by SVG rendering engines may differ, the format is backward and forward compatible. SVG engines will render what they can and ignore the rest.
SVGs are accessible; text and drawing elements are machine-readable so screen readers can other devices can parse the images.
9. Search Engine Optimization
SVGs offer improved SEO because Google, Yahoo, Bing, and other search engines can index an image’s content.
IE is the only mainstream browser which does not support SVG. If Microsoft implement SVG in IE9, it offers web developers many exciting opportunities and usage will grow exponentially.
Unfortunately, even if SVG is supported in IE9, the browser will not be available until late 2010. Microsoft are unlikely to implement it within previous versions of the browser, so there would be a considerable delay before IE9 achieves a significant market share. But let’s be thankful Microsoft are considering SVG; we’ve waited a long time.
A Comparison of Ruby Version Managers for macOS
By Daniel Kehoe,
If you're a serious Ruby developer, you'll need an up-to-date version, possibly several. We cover the best Ruby version managers for macOS.
A Guide to Git Interactive Rebase, with Practical Examples
By Tobias Günther,
Even if you're a Git pro, there might be more Git tricks to discover. Learn about interactive rebase, one of Git's most powerful tools.
Introduction to Data Types: Static, Dynamic, Strong & Weak
By Tim Hurd,
Static, dynamic, strong, weak data types? Are you confused? Learn what these terms really mean, and which is best for you.
Craig is a freelance UK web consultant who built his first page for IE2.0 in 1995. Since that time he's been advocating standards, accessibility, and best-practice HTML5 techniques. He's created enterprise specifications, websites and online applications for companies and organisations including the UK Parliament, the European Parliament, the Department of Energy & Climate Change, Microsoft, and more. He's written more than 1,000 articles for SitePoint and you can find him @craigbuckler.