
Templating Syntax in Svelte
The syntax of Svelte is similar to HTML. Anything that is uppercase is considered a component, everything else is a standard HTML tag.
Copied to clipboard!
<script>
import Sidebar from './sidebarComponent.svelte'
</script>
<!-- `main` denotes a regular HTML element -->
<main>
<!-- while `Sidebar` denotes a Svelte component -->
<Sidebar />
</main>


Resources:
π More Webtips
Master the Art of Frontend
Access exclusive interactive lessons
Unlimited access to hundreds of tutorials
Remove ads to learn without distractions