At this moment, HTML doesn’t have any way to render by a specific condition. Svelte makes conditional rendering way easy just like vanilla js syntax.
Let’s look at this with the help of an example. We’ll run this code in our App.svelte file

<script>
	const cost_of_soda = 30;
	let budget;
	function operation() {
		budget = Number(prompt("What's your budget?"));
	}
</script>

<button on:click={operation}>
	Click to start
</button>
{#if budget >= cost_of_soda}
  <p>
	  Here's your soda and your balance is {budget - cost_of_soda} rupees.	
  </p>
{:else}
  <p>
	  You can't buy a soda.	
  </p>
{/if}

So, it basically starts with {#if some_condition} and ends with {/if}.
And all the else and else if blocks will be written as {:else} & {:else if} respectively.