What are differences and consequences (both good and bad) of using either data-src
or src
attribute of img
tag? Can I achieve the same results using both? If so, when should be used each of them?
The src attribute specifies the location (URL) of the external resource.
Summary Care Records (SCR) are an electronic record of important patient information, created from GP medical records. They can be seen and used by authorised staff in other areas of the health and care system involved in the patient's direct care. Using SCR.
The HTMLMediaElement. src property reflects the value of the HTML media element's src attribute, which indicates the URL of a media resource to use in the element.
The <img> src attribute is used to specify the URL of the source image. Attribute Values: It contains single value URL which specifies the link of source image.
The attributes src
and data-src
have nothing in common, except that they are both allowed by HTML5 CR and they both contain the letters src
. Everything else is different.
The src
attribute is defined in HTML specs, and it has a functional meaning.
The data-src
attribute is just one of the infinite set of data-*
attributes, which have no defined meaning but can be used to include invisible data in an element, for use in scripting (or styling).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With