Previous chapter | Next chapter

SVG Basics

SVG and HTML are a happy marriage; you can just embed SVG code into your HTML page.

Previous chapter | Next chapter

Basic Template

<html>
    <head>
        <!-- Include CSS into HTML doc for now; to be moved to CSS resource -->
        <style>
            html {
                font-family: verdana;
            }
        </style>
    </head>
    <body>
        <h1>My First SVG Project</h1>
        <svg width="500" height="300" xmlns="http://www.w3.org/2000/svg">
            <rect width="400" height="200" x="10" y="10" fill="green"   />
          </svg>
    </body>
</html>