HTML Picture Tag


HTML Tag

In this blog about HTML Tag, we will see how that happens HTML Tag is used in responsive web designing where we need to load different images based on their viewport, height, width, orientation, and pixel density.

The Tag consists of one or more elements and an Tag. Using which we can show images. Media query inside the source tag will be for him to do.

Depending on the viewport, matching images will be loaded from different Tags, and if no source contains a matching image, the default image in the Tag will be displayed on the browser.

Example:-




    

    
        HTML picture Tag
    





This is HTML picture tag Example

default image

Output:-


Leave a Comment