is it autofocus=“autofocus” or autofocus?
I seem to recall most (maybe all) attributes in previously versions of HTML (before HTML5) required attributes to have values, like readonly="readonly" . Is this true for HTML5 and the autofocus attribute? Tim In HTML, you use boolean attributes with or without values as you like. A boolean, for W3C, like autofocus can be written like that autofocus or autofocus="autofocus" or also autofocus="" . If you don't want autofocus just don't write it. I think you are confused because XHTML requires values for all attributes: attributes="values" . Here is some information about boolean attribute use