mardi 29 septembre 2015

Can a checkbox be checked by default in the stylesheet, rather than in an inline css?

Like the title says: can a checkbox be checked by default in the stylesheet, rather than in an inline css?

Example from w3schools.com, the "car" box is checked:

<form action="demo_form.asp">
<input type="checkbox" name="vehicle" value="Bike"> I have a bike<br>
<input type="checkbox" name="vehicle" value="Car" checked> I have a car<br>
<input type="submit" value="Submit">
</form>

I'm making an "I agree to the Terms and Conditions" checkbox, and due to the clunky website I'm making this on, I can't create inline CSS. Instead, I can assign this field a css class, and edit the class in the larger stylesheet.

If it makes it easier, this will be the only checkbox on the page.




Aucun commentaire:

Enregistrer un commentaire