HTML HTML The According to the viewport, the matching image will be loaded from different This tag is a new tag in HTML5. Syntax
Following are some specifications about the HTML
Display |
Inline |
Start tag/End tag |
Both Start and End tag |
Usage |
Image |
Example
Test it Now Output: Attribute: Tag-specific attributes:
Attribute |
Value |
Description |
media |
media_query |
It defines and accept any media query which can be defined in CSS. |
srcset |
URL |
It defines the URL of the image which can be used for different situations. (Required) |
type |
video/ogg video/mp4 video/webM audio/ogg audio/mpeg |
It determines the MIME type |
src |
URL |
It specifies the location of the image. |
Global attribute: HTML Supporting Browsers
Element |
Chrome |
IE |
Firefox |
Opera |
Safari |
|
Yes |
No |
Yes |
Yes |
Yes |
|