Overview

Canvas sanitises all content created in the Rich Content Editor. This means it removes unsupported elements, rewrites parts of the HTML, and limits which CSS can be used. The goal is to protect learners, keep pages consistent, and prevent broken or insecure layouts.

The table below summarises the main behaviours observed in Canvas while building the examples in this guide. Details may vary slightly between institutions and over time as Canvas is updated, so always test important content after saving.

Summary of what Canvas removes and modifies

This table focuses on everyday authoring in the Rich Content Editor. It does not cover custom themes, LTI tools, or account-level branding.

Common HTML and CSS behaviours in this Canvas instance
ItemTypeCanvas behaviourNotes and alternatives
<script> and inline JavaScriptElement and attributeRemoved when the page is saved.You cannot add your own JavaScript to RCE pages. Only Canvas' built-in JavaScript (for example enhanceable_content) can run.
<style> and external stylesheetsElementRemoved or ignored in the Rich Content Editor.Use inline styles on individual elements instead.
Forms (<form>, inputs, etc.)Element groupRemoved or heavily sanitised so that real HTML forms are not available in normal course content.Use Canvas assignments, quizzes, or external tools for collecting responses instead of hand-built forms.
<button>,<dialog>,<progress>HTML elementsRemoved when saved in this Canvas instance.Use styled links that look like buttons, and Canvas' legacy progress bar or inline text descriptions instead of native elements.
Custom CSS classesCSS class useClass names remain in the HTML, but there is no way to define new CSS for them inside the RCE.For predictable results, rely on inline styles and the legacy Canvas classes in this guide (for example btn,ic-Table,enhanceable_content).
name on <details>AttributeStripped from <details> when saved, so browser “exclusive accordion” behaviour is not available.You can still use multiple collapsible sections with <details> and<summary>, but they will not auto-close each other.
ARIA attributesAttribute groupGenerally preserved. Elements such as alerts and progress indicators can use role, aria-label, andaria-valuenow.Always test ARIA-heavy patterns after saving, as Canvas may re-wrap content or insert extra <p> tags that affect the structure.
Inline CSS (style attribute)CSSAllowed but sanitised. Unsupported properties and values are removed, and some complex shorthand may be rewritten.Use widely supported properties such as margin, padding,border, and basicdisplay and grid patterns. Check layouts again after saving.
Text and block structureMarkup normalisationCanvas often wraps content in <p> tags, removes empty elements, and reformats whitespace.If you need tighter control over spacing, use <div> elements with inline margins instead of relying on blank lines in the editor.
Legacy Canvas components (enhanceable_content)Canvas-specific patternsStill recognised in this instance. Tabs, popovers, tooltips, draggable items, sortable lists and resizable boxes work when marked up correctly.These are legacy features and behaviour may change in future updates. Use them for optional enhancements, not as the only way to access key content.