HTML Standard Tracker

Filter

File a bug

SVNBugCommentTime (UTC)
3811<math> example.2009-09-11 10:05
@@ -29324,21 +29324,21 @@ function AddCloud(data, x, y) { ... }</pre>
   </div>
 
 
   <h6>Examples</h6>
 
   <p><i>This section is non-normative.</i></p>
 
   <p>Here is an example of a script that uses canvas to draw pretty
   glowing lines.</p>
 
-  &lt;pre>&lt;canvas width="800" height="450">&lt;/canvas>
+  <pre>&lt;canvas width="800" height="450">&lt;/canvas>
 &lt;script>
 
  var context = document.getElementsByTagName('canvas')[0].getContext('2d');
 
  var lastX = context.canvas.width * Math.random();
  var lastY = context.canvas.height * Math.random();
  var hue = 0;
  function line() {
    context.save();
    context.translate(context.canvas.width/2, context.canvas.height/2);
@@ -30186,20 +30186,57 @@ function AddCloud(data, x, y) { ... }</pre>
   element in the <span>MathML namespace</span> containing some
   appropriate error message.</p>
 
   <p>To enable authors to use MathML tools that only accept MathML in
   its XML form, interactive HTML user agents are encouraged to
   provide a way to export any MathML fragment as a
   namespace-well-formed XML fragment.</p>
 
   </div>
 
+  <div class="example">
+
+   <p>Here is an example of the use of MathML in an HTML document:</p>
+
+   <pre>&lt;!DOCTYPE html>
+&lt;html>
+ &lt;head>
+  &lt;title>The quadratic formula&lt;/title>
+ &lt;/head>
+ &lt;body>
+  &lt;h1>The quadratic formula&lt;/h1>
+  &lt;p>
+   &lt;math>
+    &lt;mi>x&lt;/mi>
+    &lt;mo>=&lt;/mo>
+    &lt;mfrac>
+     &lt;mrow>
+      &lt;mo form="prefix">&#x2212;&lt;/mo> &lt;mi>b&lt;/mi>
+      &lt;mo>&#x00B1;&lt;/mo>
+      &lt;msqrt>
+       &lt;msup> &lt;mi>b&lt;/mi> &lt;mn>2&lt;/mn> &lt;/msup>
+       &lt;mo>&#x2212;&lt;/mo>
+       &lt;mn>4&lt;/mn> &lt;mo>&#x2062;&lt;/mo> &lt;mi>a&lt;/mi> &lt;mo>&#x2062;&lt;/mo> &lt;mi>c&lt;/mi>
+      &lt;/msqrt>
+     &lt;/mrow>
+     &lt;mrow>
+      &lt;mn>2&lt;/mn> &lt;mo>&#x2062;&lt;/mo> &lt;mi>a&lt;/mi>
+     &lt;/mrow>
+    &lt;/mfrac>
+   &lt;/math>
+  &lt;/p>
+ &lt;/body>
+&lt;/html></pre>
+
+  </div>
+
+
 
   <h4>SVG</h4>
 
   <p>The <dfn><code>svg</code></dfn> element from the <span>SVG
   namespace</span> falls into the <span>embedded content</span>,
   <span>phrasing content</span>, and <span>flow content</span>
   categories for the purposes of the content models in this
   specification.</p>
 
   <div class="impl">

|