HTML Intro

HTML Intro Quiz

HTML Intro Exercise

HTML Basics

HTML Basic Quiz

HTML Basic Exercise

HTML Advance

HTML Advance Quiz

HTML Advance Exercise

HTML Tags List

HTML Global Attributes

HTML Attributes


HTML srcset Attribute

HTML srcset Attribute



The srcset attribute is used to specify the URL of the image to use in different situations like the screen width changes.It is used in the source element when used in picture element.


Used With:-


Element Attribute
source srcset




Its syntax is:- < element srcset="URL" >


Further Explanantion:-


Value Description
URL Specifies URL of the image.

Possible values of URL can be:-

  • Relative URL - points to a file within a web site 
  • Absolute URL - points to another web site

Code Explanation

All Tutorials related to HTML Attributes

All Sections related to HTML