The Include handler lets you include DOM block elements (<table> tags, <p> tags, <div> tags, etc.) from other .html files into a presentation with a tag having one of the following forms:

<a class="include" href="file_url#element_id"/>
or
<object class="include" href="file_url#element_id"/>

Here, file_url is the url for the file that contains the included element. It must be on the same server. The element_id part of the href attribute is the id attribute of the included element.

The included element can be styled with classes in the <a> tag. An element can be included multiple times, each with different style classes.

The includes below come from the file shown in the "Include Source" menu item. You can include any number of items and you can include the same item more than once.

<a class="include" href="included-elements.html#table"/>

<a class="include" href="included-elements.html#table"/>

<a class="include" href="included-elements.html#div"/>

<a class="include" href="included-elements.html#p"/>

<a class="sh_xml" href="included-elements.html"/>

An included element can be styled with classes in its <a> tag. The "include" class must be the first class. All other classes are applied to the replacement element.

The example shows a table that is included two times, each with different style classes. It uses a utility table style sheet table.css and a test table defined in table-example.html. For more information about table styling see Table Styling.

<a class="include padded bordered left monospaced" href="/~gshute/webdev/CSS/table-example.html#example-table"/>

<a class="include padded bordered right serif" href="/~gshute/webdev/CSS/table-example.html#example-table"/>

table.css

table-example.html

The Include handler detects five kinds of errors:

<a class="include" href="html.html"/>

<a class="include" href="html.html#no-such-section"/>

<a class="include" href="/~gshute/graphics/response-states.png#whatever"/>

<a class="include" href="no-such-page.html#whatever"/>

<a class="include" href="http://www.tc.umn.edu/whatever.html#whatever"/>