An Interest In:
Web News this Week
- March 31, 2024
- March 30, 2024
- March 29, 2024
- March 28, 2024
- March 27, 2024
- March 26, 2024
- March 25, 2024
August 17, 2016 08:10 am GMT
Original Link: http://feedproxy.google.com/~r/Noupe/~3/YmpFp3vUBMs/why-you-should-embed-svg-inline-98570.html
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:
Tweet
View Full Article
Noupe
Noupe passionately delivers stylish and dynamic news for designers and web-developers across the globe on all subjects of designMore About this Source Visit Noupe