The <label>
tag can be used as links for radio buttons by attaching a for
attribute.
You can detect if a radio button is checked with css by using a :checked
selector. Similarly, you can use :not(:checked) to detect when a radio button is not checked.
The ~
selector can combine the radio button and a separate div on the page so that the div can be hidden when the button is checked, etc.
Including checked
as an attribute for an input radio button tag loads the page with that radio button checked.
Hello world! This is another text box.
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Ullam, eligendi. Officiis atque rem praesentium, quos nulla repellat dolorem nihil? Voluptatum nesciunt labore porro distinctio, esse iusto voluptas. Quisquam, quae dignissimos?
Source: neon.moe