Skip to content
Permalink
Browse files

[e] (0) <math> example.

git-svn-id: http://svn.whatwg.org/webapps@3811 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
Hixie committed Sep 11, 2009
1 parent 10cc53b commit 668464c677f4bed0f3d09d0927498e37aec95544
Showing with 77 additions and 3 deletions.
  1. +39 −2 index
  2. +38 −1 source
41 index
<p>Here is an example of a script that uses canvas to draw pretty
glowing lines.</p>

&lt;pre&gt;&lt;canvas width="800" height="450"&gt;&lt;/canvas&gt;
<pre>&lt;canvas width="800" height="450"&gt;&lt;/canvas&gt;
&lt;script&gt;

var context = document.getElementsByTagName('canvas')[0].getContext('2d');
}
setInterval(blank, 40);

&lt;/script&gt;
&lt;/script&gt;</pre>




</div>

<div class=example>

<p>Here is an example of the use of MathML in an HTML document:</p>

<pre>&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;The quadratic formula&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;The quadratic formula&lt;/h1&gt;
&lt;p&gt;
&lt;math&gt;
&lt;mi&gt;x&lt;/mi&gt;
&lt;mo&gt;=&lt;/mo&gt;
&lt;mfrac&gt;
&lt;mrow&gt;
&lt;mo form="prefix"&gt;&minus;&lt;/mo&gt; &lt;mi&gt;b&lt;/mi&gt;
&lt;mo&gt;&plusmn;&lt;/mo&gt;
&lt;msqrt&gt;
&lt;msup&gt; &lt;mi&gt;b&lt;/mi&gt; &lt;mn&gt;2&lt;/mn&gt; &lt;/msup&gt;
&lt;mo&gt;&minus;&lt;/mo&gt;
&lt;mn&gt;4&lt;/mn&gt; &lt;mo&gt;&#8290;&lt;/mo&gt; &lt;mi&gt;a&lt;/mi&gt; &lt;mo&gt;&#8290;&lt;/mo&gt; &lt;mi&gt;c&lt;/mi&gt;
&lt;/msqrt&gt;
&lt;/mrow&gt;
&lt;mrow&gt;
&lt;mn&gt;2&lt;/mn&gt; &lt;mo&gt;&#8290;&lt;/mo&gt; &lt;mi&gt;a&lt;/mi&gt;
&lt;/mrow&gt;
&lt;/mfrac&gt;
&lt;/math&gt;
&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>

</div>



<h4 id=svg-0><span class=secno>4.8.16 </span>SVG</h4>

39 source
<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');

</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>

0 comments on commit 668464c

Please sign in to comment.
You can’t perform that action at this time.