title: How to render DIV content on Html5 Canvas
body: <p>i got a code which may render div content on canvas but many area i just do not understand. so guide me. here is the code which i got it.</p>
  
  <pre><code>var canvas = document.getElementById("canvas");
  var ctx = canvas.getContext("2d");
  var data = "data:image/svg+xml," +
             "&lt;svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'&gt;" +
               "&lt;foreignObject width='100%' height='100%'&gt;" +
                 "&lt;div xmlns='http://www.w3.org/1999/xhtml' style='font-size:12px'&gt;" +
                  "&lt;ul&gt; &lt;li style='color:red'&gt; hello &lt;/li&gt;  &lt;li style='color:green'&gt;thomas&lt;/li&gt; &lt;/ul&gt; "  +   
                 "&lt;/div&gt;" +
               "&lt;/foreignObject&gt;" +
             "&lt;/svg&gt;";
  
  var img = new Image();
  img.src = data;
  img.onload = function() { ctx.drawImage(img, 0, 0); }
  </code></pre>
  
  <p>1) what is the meaning of <code>data:image/svg+xml</code>
  2) what is the meaning of <code>&lt;svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'&gt;</code></p>
  
  <p>3) what is <code>&lt;foreignObject width='100%' height='100%'&gt;</code></p>
  
  <p>if possible please explain their meaning &amp; usage.</p>
  
  <p>another most important issue that <strong>Canvas &amp; browser compatibility issue
  we know that many browser version do not support html5 Canvas and in that case we can fallback and load flash canvas</strong></p>
  
  <p>so guide me how to load flash canvas and also the most important is to draw or render div content on flash canvas.</p>
  
  <p>looking for guidance in detail. thanks</p>