Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
August 17, 2016 08:10 am GMT

Why You Should Embed SVG Inline

Those working with SVG graphics have multiple options to embed them into an HTML document. Aside from using it as a classic image file via the “<img>” element, SVG can also be implemented via “<object>” or “<iframe>”. The latter two have the advantage that they allow for the execution of JavaScript and animations. The simple variant however, is marking SVG inline in the HTML source code. SVG Inline: No Additional Request Firstly, inline SVGs don’t cause an additional request, since they are a part of the HTML document. This will be especially noticeable when there are many small SVGs on one page. However, when the same graphics are used in multiple documents, embedding them externally might be the way to go. With the according cache settings, the graphics won’t have to be newly loaded for each loading document. Uniform Styles Furthermore, a completely different, very useful advantage of inline SVGs is the option to control the appearance of the graphics via the HTML document’s stylesheets. Fill and line color can be defined as well as line strength, and transformations. SVG stylesheets are marked up the same way HTML stylesheets are, and it is possible to combine HTML and SVG sectors. […]

Original Link: http://feedproxy.google.com/~r/Noupe/~3/YmpFp3vUBMs/why-you-should-embed-svg-inline-98570.html

Share this article:    Share on Facebook
View Full Article

Noupe

Noupe passionately delivers stylish and dynamic news for designers and web-developers across the globe on all subjects of design

More About this Source Visit Noupe