How to Embed Your Scratch Applet in HTML5
Even though there is a Scratch project website where the Scratch community uploads its projects, there is also an alternative method to embed Scratch within your own website. Since TeachMeProgramming.com is also teaching HTML5, we are happy to show you how to embed your Scratch applet using HTML5. Read on to find out more.
Pre HTML5 versions support the <applet> tag, however, this tag is deprecated in HTML5. HTML5 encourages the use of the <object> tag instead, which is brand new, that can be used to embed media in your website, such as videos and audio.
You will need 2 files in addition to your Scratch projects in the same directory as your HTML5 file:
The following code is used to embed a sample applet:

In the code above, the name of the Scratch project is "abc-song.sb" and is assigned to the attribute "value". The applet's dimensions (height and width) are configurable.
You can view the sample HTML5 by clicking on the image.
Enjoy!
Add this page to your favorite Social Bookmarking websites
Related Articles
- Can Children learn HTML?
- HTML5 , Videos and OGG
- Teach Me Scratch for Kids
- Teach Me Scratch - Creating Your Own Animation Using Costumes
- Teach Me Scratch - Making Your Sprite Move
- Teach Me Scratch - Adding Effects to Your Sprite
- Teach Me Scratch - Create a Comic Strip
- Teach Me Scratch - X & Y Coordinates and Pen Down Effect
- Teach Me Scratch - Sensing Feature/Hide and Show
- Teach Me Scratch - Broadcasting and Receiving
- Teach Me Scratch - Variables and Keeping Score
- Teach Me Scratch - Putting It All Together
- Teach Me Scratch - Edit Your Sprite
- Can Children learn HTML?
- HTML5 , Videos and OGG
- How to Embed Your Scratch Applet in HTML5
- Teach Me Java for Scratch Graduates
- Scratch Day 2010 in Rehovot, Israel










