rspec/rules/S1099/html/rule.adoc

35 lines
825 B
Plaintext
Raw Normal View History

2021-04-28 16:49:39 +02:00
If the ``++width++`` and ``++height++`` attributes are set, the space required for the image is reserved immediately by the browser, even before it actually starts to load the image.
Without those attributes, the page layout constantly changes as images are loaded until they are all loaded, which can disorient users.
2021-04-28 16:49:39 +02:00
== Noncompliant Code Example
----
<img src="logo.png" alt="My Company" /> <!-- Non-Compliant -->
----
2021-04-28 16:49:39 +02:00
== Compliant Solution
----
<img src="logo.png" alt="My Company" width="100" height="50" /> <!-- Compliant -->
----
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
include::message.adoc[]
'''
== Comments And Links
(visible only on this page)
include::comments-and-links.adoc[]
endif::env-github,rspecator-view[]