Created on July 24, 2025
What I am learning about HTML
<label
>Breakfast (8.00 CHF):
<fieldset class="number-picker">
<!-- defining a button of type button is important, because default on forms is submit. -->
<button type="button" class="minus">−</button>
<input
name="bellevue-activity-breakfasts"
type="number"
value="0"
min="0"
/>
<button type="button" class="plus">+</button>
</fieldset></label
>
wrap the form stuff within the to avoid using for=name
and id=name
.
also, when using a <button>
in a <form>
, the default type is submit. Therefore, you might want to change it to type="button"
to avoid submitting your form.