<html><head>
 <title>Page Title</title>
</head><body>
<div class="hslice" id="1">
 <h2 class="entry-title">Your Site Name</h2>
 <div class="entry-content"><ol>
<?php
  require_once('wp-load.php');
  $results = $wpdb->get_results("SELECT post_title, guid
          FROM $wpdb->posts where post_status = 'publish'
     ORDER BY ID DESC LIMIT 5");
  foreach($results as $row) {
   echo "<li><a href='".$row->guid . "'>"
     . $row->post_title ."</a></li> \n";
  }
?>
</ol></div></div>
</body></html>

The Web Slice code above makes a connection to a WordPress database and creates a list of the most recent blog articles published. The list is then displayed in the Web Slice.

How to Install Web Slices in IE 8 Now that your web slice is ready, it's time to publicize the slice on your site so that visitors using Windows Internet Explorer 8 can add the slice to their favorites bar. For that, we'll create a simple HTML button which upon clicking will automatically add the web slice to the IE browser.

<input type="button" value="Add [site name] Web Slice"
     onclick='window.external.AddToFavoritesBar("http://web-slice-url",
	"Your Website Name", "slice");' />
Click this button inside IE 8 for a live preview. The above Web Slices tutorial is specific to WordPress blogs. If you have a blog website on another platform, you can just turn the RSS feed into a Web Slice. http://www.labnol.org/internet/write-ie8-web-slice-for-blogs/8013/" title="How to Write an IE Web Slice for WordPress">How to Write an ie Web Slice for WordPress http://www.ieaddons.com/en/addons/?feature=webslices" title="Internet Explorer Gallery Add-Ons">

Web Slice Format Specification - Version 0.9 A Web Slice allows users to subscribe to a portion of a Web page. The Web Slice format consists of the minimum HTML annotations necessary to enable the publication and consumption of a mutable item on a Web page. Web publishers can use this format in conjunction with properties from hAtom Microformat to make portions of a Web page subscribe-able.

http://msdn.microsoft.com/en-us/library/cc956160(VS.85).aspx" title="Web Slices Overviews">Web Slices Overviews Creating Web Slices This section lays out the basics of creating Web Slices and gives some tips on how to design, format, and style them. It also provides some sample layouts. A Web Slice consists of three elements: A parent element of class hslice. A unique id field in the parent element. A sub-element of class .entry-title. Internet Explorer scans for the hslice tag and detects the Web Slice automatically, if the other two elements are present. The following example is a valid Web Slice.
I am not a very useful Web Slice.
The button title on the Favorites bar would be “I am not a very useful Web Slice.” To make the Web Slice more useful, you might want to add elements of class “entry-content”. Only these elements will appear in the Web Slice preview window unless an alternate display source is used (details in next section). Example:
I’m a more useful Web Slice.
This will appear in the preview window.
The example above will create a Web Slice with title “I’m a more useful Web Slice” and a preview window containing “This will appear in the preview window.” Alternative Display Source The Web Slice preview window will not always display content the exact same way it appears on a Web page; some of the formatting is stripped away. However, this can be remedied by specifying an alternative display source, which allows the preview window to navigate to a specified location and fetch content for the preview window from there. Note that this location can be the original page the Web Slice appeared on. Say you have a Web site, http://www.example.com, consisting of a single Web Slice. If you want content in the preview window to appear exactly as it does on example.com (keeping all original formatting), you could use an alternative display source like this:
Slice Title
Content
In this case, the preview window will navigate back to the original Web page and render content from there. This should preserve all the formatting. Note that any other content at the alternate display location will also be visible in the preview window. If you don’t want this, make sure the alternative display location is a page containing only the Web Slice preview content. Link Targeting If you do end up using an alternate display source, note that hyperlinks will open within the preview window. In order to have them open in the current tab, explicitly force the link to do so via the target tag. Link In the context of a Web Slice, this will open http://www.example.com in the current tab rather than the preview window. If you don’t use an alternate display source, links will open in the current tab by default. Applying Styles to Web Slices In general, styles apply to Web Slices the same way they do to other elements on a Web page. However, there are two significant points to be aware of: Styles applied to parent elements are not inherited by the preview window. Styles applied to the element are inherited by the preview window. For example:
I’m a more useful Web Slice.
This will appear in the preview window.
The code above makes the content blue in the browser window but will not make it blue in the preview window. To make it blue in the preview window, you can add an inline style to the content element:
I’m a more useful Web Slice.
This will appear in the preview window (in blue!).
Now the content will appear as blue both on the Web page and in the preview window. http://msdn.microsoft.com/en-us/library/cc848871(VS.85).aspx" title="Internet Explorer 8 Web Slice Style Guide">Internet Explorer 8 Web Slice Style Guide