Explain the srcset attribute in the tag. Why is it useful?

srcset allows you to specify different image sources for different screen resolutions, improving responsiveness and performance.

Example:

<img src="small.jpg" srcset="medium.jpg 768w, large.jpg 1200w" alt="Responsive Image">