HTML IMG

Content Controls

Content

The controls in this section allow you to define and modify the essential attributes of the HTML IMG element. These settings influence the source, sizing, alternative text, and loading behavior of the image, ensuring it appears correctly and efficiently on your website.

  • Attributes
    • src – Specify the URL of the image you want to display.
    • srcset – Define the source set of the image, allowing the browser to select different images depending on the viewing context, such as device screen resolution.
    • sizes – Indicate the sizes of the media resource, which helps the browser to select the most appropriate image source from the srcset based on the current layout of the page.
    • alt – Provide alternative text for the image, which will be displayed if the image cannot be loaded, and is also used for web accessibility purposes.
    • loading – Choose the loading behavior for the image with options like “lazy” for lazy loading (the image is loaded only when it’s in the viewport) and “eager” for immediate loading.
    • width – Set the display width of the image in pixels.
    • height – Set the display height of the image in pixels.