IntelliJ IDEA 提示"Form input without an associated label or title attribute"

在HTML中如果用了input标签,没有指定placeholder的话,IDE会提示:

Form input without an associated label or title attribute

解决方案:指定placeholder,如下:

  <input type="password" name="password" id="password" placeholder="请输入密码">

或者,也可以指定placeholder为空,

如下:

  <input type="password" name="password" id="password" placeholder="">

如果还是报提示, 则把input标签放在label标签里。

苟利国家生死以, 岂因祸福避趋之
原文地址:https://www.cnblogs.com/chintsai/p/11829235.html