Skip to content

data include replace

Sid Vishnoi edited this page Jul 8, 2020 · 6 revisions


Configuration options

W3C Configuration options

Linter rules

Internal properties

Handled by ReSpec for you.

Special <section> IDs

HTML elements

Custom Elements


HTML attributes

CSS Classes

Special properties

Clone this wiki locally


By default inclusion happens by placing the content inside the including element. At times, you will actually want the element to be replaced by the inclusion. If so, simply set this attribute to any truthy value.

Pretending that "section.frag" is a <section> element, the <div> below would be replaced with a <section>.

<div data-include="section.frag" data-include-replace="true">
  <!-- this all gets replaced, including the div. -->