YouTip LogoYouTip

Att Source Media

## Contents * (#example) * (#definition) * (#browser) * (#syntax) * (#parameter) * (#related) ## Example The media attribute specifies the type of media resource, so the browser can decide whether to use this source. The following example demonstrates selecting different images based on display size:

Resize the browser to display different resource (resize to less than 600px).

Image:

Pulpit rock Try it Yourself Β» ## Definition and Usage The media attribute specifies the type of media resource of the element. ## Browser Support | IE | Firefox | Chrome | Safari | Opera | |---|---|---|---|---| | | | | | | All browsers support the media attribute. ## Syntax ## Parameter Values | Value | Description | |---|---| | media_query | Specifies the type of media resource. | ## Related Pages HTML DOM Reference: (#) HTML Reference: (#) HTML Reference: [HTML
← Att Source SrcAtt Select Size β†’