The documentation in this section describes common tasks related to the Web page that hosts the Silverlight plug-in. When you embed the plug-in in a Web page, you should also provide a custom installation and upgrade experience. For more information, see Microsoft Silverlight Installation Experience White Paper and Sample Code.
This topic contains the following sections:
You typically embed the Silverlight plug-in by adding an object element directly to your HTML. The object element is recommended for the following reasons:
It is self-contained, enabling you to load your application after a single download from the server.
The object element also lets you provide child content that is displayed when a user does not have Silverlight installed. This provides a lightweight way to customize the plug-in installation experience.
For more information, see How to: Add Silverlight to a Web Page by Using HTML.
For more information, see How to: Specify and Retrieve Custom Initialization Parameters.
In most cases, you will specify the latest version of Silverlight as described in the embedding topics. However, in some cases you might want to require a specific version or perform fine-grained version detection in your Web page.
For information about how to indicate a specific Silverlight version, see Silverlight Plug-in Versioning.
When you set the height and width of the plug-in, you can specify absolute or relative values. Relative values are percentages of the browser height or width, which means that the plug-in will resize when the browser window resizes. It is also possible to programmatically resize the plug-in through the HTML DOM.
For more information, see Silverlight Plug-in Sizing.