The picture element is an HTML element for declaring images based on different screen sizes or viewport. It takes in two properties, the — <source> tag which makes use of the srcset property to specify different images. There are a few use-case scenarios in which the picture tag can be very useful, below are three examples.

3m read timeFrom eke.hashnode.dev
Post cover image
Table of contents
Use CasesHow it worksBrowser CompatibilityFinallyImportant Links
2 Comments

Sort: