<?xml version="1.0"?>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:svg="http://www.w3.org/2000/svg" >
  <head>
    <title>&lt;ForeignObject&gt;s</title>
    <style>
      circle:hover {fill-opacity:0.9; stroke-width:2mm;}
    </style>
  </head>

  <body>
    <h1>&lt;ForeignObject&gt;s</h1>
  <ul>
    <li>Non-SVG elements, such as XHTML and MathML can be placed onto SVG canvas using &lt;foreignobject&gt;</li>
    <li>The foreign objects will be inserted at correct place in drawing order</li>
  </ul>
  <pre style="background-color:#DDDDFF;">
  &lt;svg xmlns:html="http://www.w3.org/1999/xhtml"
          xmlns="http://www.w3.org/2000/svg" &gt;
    &lt;circle ... /&gt;
    <strong>&lt;foreignObject x="2cm" y="3cm" width="8cm" height="4cm"&gt;
      &lt;html:div style="background-color:yellow; font:40pt sans-serif;" &gt;
        The quick brown fox jumps over lazy dog
      &lt;/html:div&gt;
    &lt;/foreignObject&gt;</strong>
    &lt;circle ... /&gt;
    &lt;circle ... /&gt;
  &lt;/svg&gt;
  </pre>

  <svg:svg  width="12cm" height="12cm">
    <svg:g style="fill-opacity:0.7; stroke:black; stroke-width:0.1cm;">
      <svg:circle id="circle1" cx="6cm" cy="2cm" r="100" style="fill:red;" transform="translate(0,50)" />
    <svg:foreignObject x="2cm" y="3cm" width="8cm" height="4cm" style="overflow:hidden;"><html:div style="background-color:yellow; font:40pt sans-serif;" >The quick brown fox jumps over lazy dog
      </html:div></svg:foreignObject>
      <svg:circle id="circle2" cx="6cm" cy="2cm" r="100" style="fill:blue;" transform="translate(70,150)" />
      <svg:circle id="circle3" cx="6cm" cy="2cm" r="100" style="fill:green;" transform="translate(-70,150)"/>
      <svg:rect x="0" y="0" width="12cm" height="12cm" style="fill:none;stroke:black; stroke-width:1;"/>
    </svg:g>
  </svg:svg> 
</body>
</html>