HTML DOM Link media Property
The HTML DOM link media property is used to set or return the value of the media attribute of an <link> element. The media attribute is used to specify what type of media devices the target resource is optimized.
It is used to return the media property.
It is used to set the media property.
- all: Suitable for all devices
- aural: Speech synthesizers
- braille: Braille feedback devices
- handheld: Handheld devices (small screen, limited bandwidth)
- projection: Projectors
- print: Print preview mode/printed pages
- screen: Computer screens
- tty: Teletypes and similar media using a fixed-pitch character grid
- tv: Low resolution or limited scroll ability type devices like Television.
Return Value: It returns a String value which represents media types comma-separated list.
Example: Below HTML code illustrates, how to return the link media property.
- Google Chrome
- Internet Explorer
- Apple Safari