Cover page images (keys)

HTML Slidy: Slide Shows in XHTML

Dave Raggett, <>

HTML Slidy: Slide Shows in XHTML

For handouts, its often useful to include extra notes using a div element with class="handout" following each slide, as in:

<div class="slide"> 
 ... your slide content ...

<div class="handout">
 ... stuff that only appears in the handouts ...

What you need to do

To get the W3C Style

The head element should include the following link to the style sheet:

<link rel="stylesheet" type="text/css" media="screen, projection"
 href="" /> 

The body element's content should start with the following markup:

<div class="background"> 
  <img id="head-icon" alt="graphic with four colored squares"
    src="" align="left" /> 
  <object id="head-logo" title="W3C logo" type="image/svg+xml"
   alt="W3C logo" id="head-logo-fallback"

This adds the logos on the top left and right corners of the slide.

You are of course welcome to create your own slide designs.

To use it off-line

The following files must be copied on your local machine in a folder/directory .../Slidy of your own choice:

The simplest thing is to use cvs to check out the whole directory, but remember to periodically check for updates

You then have two choices:

  1. Use relative URIs depending on your local setup to access the appropriate files. Use the same directory structure as on the W3C server, ie, ".../2005/Talks/...".
  2. Run a Web server on your machine so that the directory above can be accessed via http://localhost/Talks/Tools/Slidy and use the URIs of the form "/Talks/Tools/Slidy/show.css", "/Talks/Tools/Slidy/slidy.js".

In both cases you can then publish your files on the W3C server unchanged.

Generate a Title Page

If you want a separate title page, the first slide should be as follows:

<div class="slide cover"> 
 <img src="" 
  alt="Cover page images (keys)" class="cover" /> 
 <br clear="all" />            
 <h1>HTML Slidy: Slide Shows in XHTML</h1> 
 <p><a href="">Dave Raggett,</a> 
 <a href=""></a></p> 

The style sheet looks for the class "cover" on div and img elements

Incremental display of slide contents

For incremental display, use class="incremental", for instance:

which is marked up as follows:

  <ul class="incremental"> 
    <li>First bullet point</li> 
    <li>Second bullet point</li> 
    <li>Third bullet point</li> 
  <p class="incremental">which is marked up as follows:</p> 
  <pre class="incremental"> 

You can use class="incremental" on the following elements

Make your images scale with the browser window size

For adaptive layout, use percentage widths on images, together with CSS positioning:

  <div class="slide"> 
    <h1>Analysts - "Open standards programming will become 
    mainstream, focused around VoiceXML"</h1> 
    <!-- use CSS positioning and scaling for adaptive layout --> 
    <img src="trends.png" width="50%" style="float:left" 
     alt="projected growth of VoiceXML" /> 
    <blockquote style="float:right;width: 35%"> 
      VoiceXML will dominate the voice environment, due to its 
      flexibility and eventual multimodal capabilities 
    </blockquote><br clear="all" /> 
    <p style="text-align:center">Source Data Monitor, March 

Incremental display of layered images

These can be marked up using CSS relative positioning, e.g.

  <div class="incremental" 
   style="margin-left: 4em; position: relative"> 
    <img src="face1.gif" alt="face" 
     style="position: static; vertical-align: bottom"/> 
    <img src="face2.gif" alt="eyes" 
      style="position: absolute; left: 0; top: 0" /> 
    <img src="face3.gif" alt="nose" 
      style="position: absolute; left: 0; top: 0" /> 
    <img src="face4.gif" alt="mouth" 
      style="position: absolute; left: 0; top: 0" /> 

You should also use transparent GIF images to avoid the IE/Win bug for alpha channel in PNG. A fix is expected in IE 7. A work around is available on My thanks to ACID2 for the graphics.

face eyes nose mouth

Include SVG Content

Inclusion of SVG content can be done using the object element, for example:

Indian Office logo

has been achieved by:

<object data="example.svg" type="image/svg+xml" 
  width="50%" height="10%" title="Indian Office logo"> 
    <img src="example.png" width="50%" 
          alt="Indian Office logo" /> 

This ensures that the enclosed png is displayed when the browser has no plugin installed or can't display SVG directly.

However, there are caveats, see the next slide!

Caveats with SVG+object

There is a serious bug in IE6+Adobe Plugin that can create problems. Namely:

On Windows, the Adobe SVG plugin doesn't respect the CSS z-index property, and if used on backgrounds will always show through other content.

Some browsers (e.g. Opera 8) only support SVG Tiny, which doesn't support external style sheets or style elements within SVG. The work around is to set the properties via style attributes on the corresponding elements. In principle, browsers should honor the version attribute and fall back to the alternative within the object element if they don't support the version used by a given SVG file.

Are there any tools for downgrading SVG to SVG Tiny?

Closing Remarks