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 picture Tag

HTML picture Tag



The picture tag gives web developers more flexibility in specifying image resources. The picture element contains two tags. One or more source tags and one img tag.


Working Principle:-


It basically works in a way such that first, it looks for the source element where the media query matches the viewport and after that, it will display the image. The use of img tag is necessary as it is used as a fallback in case the source element is not present. Its working principle is similar to video and audio elements.




Its syntax is:- < picture >

Code Explanation

All Tutorials related to HTML Tags List

All Sections related to HTML