rspec/rules/S1927/html/rule.adoc

27 lines
544 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
This rule checks that the specified attributes are present in HTML tags.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
Given a required attribute list of: ``++img.alt,img.height,img.width++``:
----
<img src="/images/queen.png"> <!-- Noncompliant; missing all required attributes -->
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
<img src="/images/queen.png" width="60" height="85" alt="Elizabeth II">
----
ifdef::env-github,rspecator-view[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]