Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML link media Attribute

HTML media Property

HTML link Tag Reference HTML tag

Example

Two different stylesheets for two different media types (computer screen and print):

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the media property.


Definition and Usage

The media attribute specifies what device the linked document is displayed on.

This attribute is usually used with CSS stylesheets to specify different styles for different media types.

The media attribute accepts several values.


Differences between HTML 4.01 and HTML5

The media attribute now supports more values.


Syntax

HTML tag