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>
In HTML5, the <applet> element is obsolete, not deprecated. So, we use the generic <object> element. Also, we need an alternative to the archive, code and codebase attributes. It took me a while to work out the solution, with the help of the W3C validator – we can use the <param> element.
Now, the HTML5 code:
<!DOCTYPE html><html lang="en"><meta charset=UTF-8 > <object tabindex="0" type="application/x-java-applet" height="387" width="482"> <!--Generic parameters for all Java applets. --> <param name="codebase" value="http://scratch.mit.edu/static/misc/" > <param name="archive" value="ScratchApplet.jar" > <param name="code" value="ScratchApplet" > <!--Specific parameters. --> <param name="project" value="../../static/projects/technoguyx/355353.sb" > Your browser needs Java to view projects. </object> ...
Drum Kit 2.0, by technoguy.
Comments
Awesome Post
telefonkatalogenbiz
I recently came across your article and have been reading along. I want to express my admiration of your writing skill and ability to make readers read from the beginning to the end. I would like to read newer posts and to share my thoughts with you.
Really great post, Thank you
Really great post, Thank you for sharing This knowledge.Excellently written article, if only all blogger offered the same level of content as you, the internet would be a much better place. Please keep it up!
before the submission of
before the submission of assignment get in contact with us through our proofreading and editing site so that we could let you know whether you assignment is free of error or not.
Awesome Post
events today in delhi
Just wanted to drop a comment and say I am new to your blog and really like what I am reading. Thanks for the great content. Look forward to coming back for more......
Reply to comment | Nick Freear
Wow, this article is fastidious, my sister is
analyzing these kinds of things, thus I am going to let know her.
Reply to comment | Nick Freear
Have you ever considered about adding a little bit more than
just your articles? I mean, what you say is important and
all. However think of if you added some great pictures or video clips to give your posts more,
"pop"! Your content is excellent but with images and video clips, this
website could certainly be one of the greatest in its niche.
Very good blog!
Paper over-burden is yet a
Paper over-burden is yet a different issue that can reason a temporarily uncooperative research paper mind. Composing is a cognitively extreme process, one that needs an abnormal amount of fixation and a level of mental stamina.
how good it is
Paper over-burden is yet a different issue that can reason a temporarily uncooperative mind. Composing is a cognitively research paper extreme process, one that needs an abnormal amount of fixation and a level of mental stamina.
Great post
There are some very great sources here and thank you for being so kind to post them here.
telefonkatalogen.biz
not working
Not working, something seems to keep the loading from completing
http://www.lavridsen.dk/linus/HomeDefender/
Reply to comment | Nick Freear
I enjoy, cause I found exactly what I used to be taking a look for.
You've ended my 4 day long hunt! God Bless you man. Have a nice day. Bye
Here is my blog post; Kasha
RE: not working
Hi Allan,
Thanks for stopping by. I think the problem is the name attribute on the <param> element,
<param name="HomeDefender" value="HomeDefender.sb">Should be:
<param name="project" value="HomeDefender.sb">I hope that helps. Best wishes,
Nick
Reply to comment | Nick Freear
As long as you shy away from ladies or spend you evenings alone, instead
you will become irresistible. In addition, the friend who have in common might be
able to go through the emotional devastation wrought by it.
Women go crazy for him and no matter how bad it ended.
Maybe the woman will. This is only inviting agony and suffering on your side.
A woman who is ready for a how get a girlfriend.
Here is my web-site how do you get a girlfriend
I'm really enjoying the
I'm really enjoying the theme/design of your website. Do you ever run into any browser compatibility issues? A small number of my blog readers have complained about my website not working correctly in Explorer but looks great in Firefox. Do you have any advice to help fix this issue? Renaldo Sprole
Post new comment