Comments: This article describes how to declare HTML5 and how to use HTML5 to create canvas elements. If you need it, refer to HTML5 to create canvas elements.
The Code is as follows:
<! -- <! DOCTYPE> Declaration must be the first line of the HTML document, located before the <! DOCTYPE html>
<Html>
<Head>
<Meta http-equiv = "Content-type" content = "text/html; charset = UTF-8">
<Title> HTML5 </title>
<Script type = "text/javascript" charset = "UTF-8">
<! -- This function will be called after the page is fully loaded -->
Function pageLoaded ()
{
Alert ('html5 page loaded! ');
}
</Script>
</Head>
<Body onload = "pageLoaded ();">
<Canvas width = "640" height = "480" id = "tCanvas" style = "border: black 1px solid;">
<! -- The following font is displayed if the browser does not support it -->
Tip: your browser does not support <canvas> labels
</Canvas>
</Body>
</Html>