# How to specify the URL of the image to use in different situations in HTML?

HTMLWeb DevelopmentFront End Technology

Use the srcset attribute to specify the URL of the image to use in different situations in HTML.

## Example

You can try to run the following code to implement srcset attribute. Resize the browser to see different images loading −

<!DOCTYPE html>
<html>
</html>