For the past year I've been following the progress of HTML5 with interest. And recently I've become interested in MIT's Scratch. So naturally I've been test embedding Scratch using it's Java applet in HTML5. The only article I've found so far on embedding Scratch in HTML5 contains a number of errors and invalid markup, so I'm setting the record straight.
First, the situation in HTML 4.01/XHTML 1.0 –
<object> is the preferred element, with
<applet> deprecated. So,
<applet> is valid in HTML 4 Loose (XHTML 1.0 Transitional), but not HTML 4 Strict.
Example embed for HTML 4.01:
<applet codebase="http://scratch.mit.edu/static/misc/" archive="ScratchApplet.jar" code="ScratchApplet" height="387" width="482"> <param name="project" value="../../static/projects/technoguyx/355353.sb" > Your browser needs Java to view projects. </applet>