Skip to content
Marcos Caceres edited this page Mar 28, 2026 · 7 revisions

.remove

Marks an element to be removed from the document during processing. This is how the ReSpec <script> elements and config blocks are handled — they are stripped after processing completes.

Usage

<div class="remove">
  <p>This content is for authoring convenience only and won't appear in the output.</p>
</div>
<script src="respec-w3c.js" class="remove" async></script>
<script class="remove">
  var respecConfig = { ... };
</script>

Notes

  • The .remove class strips the element entirely from both the live preview and the saved HTML export
  • For content that should only be stripped from the saved/exported HTML (but remain visible during live authoring), use .removeOnSave instead
  • All <script class="remove"> elements in a ReSpec document use this pattern

Guides

Configuration options

W3C Configuration options

Linting 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