From the course: Creating Web Icons with SVG
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Overview of the methods
- [Voiceover] At their core SVG's are images. That means we can use them like we use any other image files either as reference elements or as background elements using CSS. However, because SVG's are code based we can also add them directly to the markup of an HTML document to unlock some cool extra functionalities. In this chapter we'll look at three different methods to add individual SVG's to an HTML document. In the process I'll also show you how to make your graphics backwards compatible to browsers that don't support SVG's. The first method replaces an existing PNG header image with a reference to the matching SVG I created and optimized in the previous chapter. The second method places the actual SVG code inside the HTML document allowing us to change the appearance of the SVG using CSS. And the third method swaps out existing PNG icons for SVG varieties using background image CSS functionality. all right, now that you know what we're doing let's get cracking.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Overview of the methods1m
-
(Locked)
Add SVG as a regular image4m 9s
-
(Locked)
Add backwards compatibility with SVGeezy4m 8s
-
(Locked)
Add SVG as an inline element4m 12s
-
(Locked)
Add backwards compatibility and more with SVGInjector6m
-
(Locked)
Add SVG as a background image2m 23s
-
(Locked)
Make SVG background images backward compatible1m 50s
-
(Locked)
A word on SVG accessibility4m 25s
-
(Locked)
-
-
-
-