3 <script type=
"text/javascript">
5 var NS
= "http://www.w3.org/2000/svg";
6 var s
= document
.createElementNS(NS
, "svg");
7 s
.setAttribute("width", 100);
8 s
.setAttribute("height", 100);
10 var rect
= document
.createElementNS(NS
, "rect");
11 rect
.setAttribute("width", "100%");
12 rect
.setAttribute("height", "100%");
13 rect
.setAttribute("fill", "blue");
17 document
.getElementById("d").appendChild(s
);
22 <body onload=
"draw()">
23 <div style=
"border: 5px solid black; float: left;" id=
"d"></div>
24 <p style=
"clear: left;">You should see a solid
5px black border around a
100x100 blue rect.
</p>