In this section, you'll learn about the single most basic usage of an SVG image, using it the same way you would use a JPG, PNG, or GIF, as the src of an img element. If you've done any work with HTML at all then you will know how to do this since it's just an image element, but you should start to think about all the different ways you can use SVG, and this is a big one.
Looking at the following code sample, there's nothing special at all about the img element. There's an src pointing to the SVG image, height and width to define the image's dimensions, and an alt attribute to provide a textual representation of the image for screen readers and other cases where the image may not display:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Mastering SVG - Inserting an SVG Image into an HTML
Document</title>
</head>
<body>
<img src="1-2-circles.svg" width="250" height="250" alt="an image
showing four circles lined up diagonally across the screen">
</body>
</html>
Running the preceding code in a browser renders the following: