Correct way to do HTML5 checkbox

As far as I know and the docs state, nothing fundamental has changed. The basic markup is

<input name="your_name" value="your_value" type="checkbox">

What is new is some interesting properties.

  • form – a reference to the form the control is associated with (nice!)
  • autofocus – to be focused as soon as the document is loaded (nice!)
  • required – require that it be checked (super nice! Although it isn’t supported by Internet Explorer or Safari (yet).)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)