What is the syntax for boolean attributes, e.g. a checked checkbox, in HTML?

前端 未结 9 1434
故里飘歌
故里飘歌 2020-12-05 18:09

Sounds like a bit of a silly question, but I am wondering what is the best way of stating that a checkbox is checked/unchecked in HTML.

I have seen many different ex

9条回答
  •  萌比男神i
    2020-12-05 18:29

    The presence of the "checked" property specifies the status. The value is irrelevant/not needed.

    
    
    

    is my suggestion

提交回复
热议问题