Svelte · Junior · Question 4 of 76
What can a .svelte file contain?
- ✓Correct answer: A
<script>block, markup and a<style>block, all optional - 2Only markup; logic must live in a separate
.jsfile - 3Only one root HTML element
Explanation
A component can have several top-level elements. There is also <script module>, which runs once when the module is evaluated rather than for each instance.