Home > Net >  Is there any functional purpose to specify type = text for input elements?
Is there any functional purpose to specify type = text for input elements?

Time:01-11

I some times see this form:

  <input type="text"></input>

However; as this is the default as seen on MDN, is there any reason to state it explicitly?

CodePudding user response:

Unfortunately ...

Although it is the default, if you do not explicitly state it in the HTML then the selector:

input[type=text]{
}

will not work.

  •  Tags:  
  • Related