From the course: Learning SVG
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
SVG shape elements
- [Instructor] SVG shapes are the elements that create the graphics displayed in an SVG. We'll go into detail on each of the available shapes in the next chapter, so for now let's look at how they work on a more general level. This SVG we created earlier has a series of shapes split into individual elements. Inspecting the code in the browser, you can see these shapes as individual elements. You'll remember I created this graphic by first drawing a square, and then four circles, and then connecting them all together. Well, in reality, they are still individual elements, so they each have their individual element markup. This square in the center is a rect element because it's a rectangle. The other four are paths because they are irregular paths. You remember, they started out as a circle, and then I added an extra point to them and pulled out that corner. Well that changed them from being circles to just being paths. The blue box around the symbol is also a path, because it has…
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
-
-
-
-
Add SVG to a web document3m 54s
-
(Locked)
Define the display size of an SVG3m 8s
-
(Locked)
Understand the viewBox5m 20s
-
(Locked)
SVG shape elements4m 52s
-
(Locked)
Group SVG shapes with <g>2m 54s
-
(Locked)
Reuse SVG symbols with <symbol> and <use>5m 31s
-
(Locked)
Size used SVG symbols6m 14s
-
(Locked)
Apply CSS to individual symbol instances4m 25s
-
-
-
-
-