How to Embed Silverlight in HTML

How to Embed Silverlight in HTML thumbnail
How to Embed Silverlight in HTML

Silverlight is a new development platform from Microsoft for creating rich media applications for the Web and desktop and mobile operating systems. As a free platform, it works on the .NET framework and is expanded with user plug-ins. Embedding Silverlight in the HTML code of a web page makes use of the OBJECT tag and PARAM child element. Silverlight must be installed on the user's computer for the plug-in embedded to work. Using HTML comments, users who do not have Silverlight installed receive a message to download the platform for free.

Things You'll Need

  • Text editor
Show More

Instructions

    • 1

      Open your web page's HTML file in a text editor by clicking on "File" and "Open." Any text editor will do however, but comes with Notepad and Mac OS comes with Text edit. These applications are found under Accessories and Applications respectively.

    • 2

      Place the OBJECT tag and PARAM child element between the BODY tags of the web page according to Microsoft's specifications. For example:
      <object width="300" height="300"
      data="data:application/x-silverlight-2,"
      type="application/x-silverlight-2" >
      <param name="source" value="SilverlightApplication1.xap"/>
      </object>

      Change the value of the PARAM child element to the name of the Silverlight plug-in you want to embed.

    • 3

      Add an HTML comment to point users to download Silverlight if it is not installed on their computers. The comment as provided by Microsoft looks like this:
      <object id="SilverlightPlugin1" width="300" height="300"
      data="data:application/x-silverlight-2,"
      type="application/x-silverlight-2" >
      <param name="source" value="SilverlightApplication1.xap"/>

      <!-- Display installation image. -->
      <a href="http://go.microsoft.com/fwlink/?LinkID=149156&v=4.0.50401.0"
      style="text-decoration: none;">
      <img src="http://go.microsoft.com/fwlink/?LinkId=161376"
      alt="Get Microsoft Silverlight"
      style="border-style: none"/>
      </a>

      </object>

      The comment must be after the PARAM child element and before the OBJECT end tag.

    • 4

      Save the file.

Related Searches:

References

  • Photo Credit BananaStock/BananaStock/Getty Images

Comments

You May Also Like

  • How to Embed Silverlight Video

    Silverlight is Microsoft's answer to Adobe Flash. The cross-platform Silverlight plugin allows users to play games, watch movies, listen to music and...

  • How to Embed a Silverlight Media Player

    Microsoft Silverlight has become a popular player for high-definition streaming web video. It is used by big companies such as Netflix and...

  • How to Build a Silverlight Website

    Microsoft Silverlight is a development platform used to build a wide variety of media applications. Web developers use Silverlight to embed these...

  • Embedded Resources in Silverlight

    Microsoft Silverlight is a powerful development platform used to create rich media applications for the Web, desktop and mobile phones. In Silverlight...

  • How to Embed WPF Controls in Silverlight

    Microsoft Silverlight is an application framework for coding and running rich Internet applications. WPF stands for Windows Presentation Foundation. The WPF controls...

  • How to Host a Wpf Application in Silverlight

    Silverlight is a Microsoft coding system used to create web-hosted applications, frequently videos or interactive games. You can now make offline applications...

  • How To Embed Video in Microsoft Expressions

    Microsoft Expression Web makes adding video to your web page quick and easy, whether you are embedding a video from an external...

  • Silverlight Game Tutorial

    Silverlight is streaming media extension for Microsoft's .NET development framework. Because of the way the platform is designed, Silverlight applications are cross...

  • How to Embed a Video in Publisher 2007

    The Microsoft Office Publisher 2007 application allows you to create custom Web pages using various Web tools that require no additional HTML...

  • How to Add an Image to a Silverlight Button

    Silverlight is a type of programming language similar to the Macromedia Flash website design language. The Silverlight language is used to create...

Related Ads

Featured