Skip to content

src-not-empty

Src of img(script, link) must set value.

Empty of src will visit current page twice.

Level: Error

  1. true: enable rule
  2. false: disable rule

The following patterns are not considered rule violations

Section titled “The following patterns are not considered rule violations”
<img src="test.png" />
<script src="test.js"></script>
<link href="test.css" type="text/css" />
<embed src="test.swf">
<bgsound src="test.mid" />
<iframe src="test.html">
<object data="test.swf">

The following patterns are considered violations

Section titled “The following patterns are considered violations”
<img src />
<script src=""></script>
<script src></script>
<link href="" type="text/css" />
<link href type="text/css" />
<embed src="">
<embed src>
<bgsound src="" />
<bgsound src />
<iframe src="">
<iframe src>
<object data="">
<object data>