Svelte · Junior · Question 48 of 76
What does <svelte:element this={tag}> do?
- ✓Correct answer: Renders an HTML element whose tag name is known only at runtime
- 2Renders a component dynamically
- 3Creates a custom element
Explanation
Useful for headings with a configurable level (h1-h6) or a button/a switch. If this is falsy, nothing is rendered.