HTML DOM Link media Property Last Updated : 22 Aug, 2022 Comments Improve Suggest changes Like Article Like Report 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. Syntax: It is used to return the media property. linkObject.media; It is used to set the media property. linkObject.media="values" Property values: all: Suitable for all devicesaural: Speech synthesizersbraille: Braille feedback deviceshandheld: Handheld devices (small screen, limited bandwidth)projection: Projectorsprint: Print preview mode/printed pagesscreen: Computer screenstty: Teletypes and similar media using a fixed-pitch character gridtv: 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. HTML <!DOCTYPE html> <html> <head> <link id="linkid" rel="stylesheet" type="text/css" href="" media="screen"> </head> <body style="text-align:center;"> <h1>GeeksforGeeks</h1> <h2>DOM Link media Property</h2> <button onclick="btnclick()">Return</button> <p id="pid" style="font-size:25px;color:green;"> </p> <script> function btnclick() { // return Link media Property var newVar = document .getElementById("linkid").media; document.getElementById( "pid").innerHTML = newVar; } </script> </body> </html> Output: Supported Browsers: Google Chrome 1Edge 12Internet Explorer 6Firefox 1Opera 12.1Apple Safari 4 Comment More infoAdvertise with us Next Article HTML DOM Audio mediaGroup Property M manaschhabra2 Follow Improve Article Tags : HTML HTML-DOM HTML-Property Similar Reads HTML | DOM Link type Property The DOM Link type Property is used to set or return the content type or MIME type of the linked Document. For eg. text/css", "text/javascript", "image/gif", etc. Syntax: It returns the type property.linkObject.typeIt is used to set the type property.linkObject.type = MIME-type Property Values: It co 1 min read HTML DOM Source media Property The HTML DOM Source media Property is used to set or return the value of the media attribute of the <source> element. The <source> media attribute is used to accept any valid media query that would normally be defined in a CSS. This attribute can accept several values. Syntax: It is used 2 min read HTML | DOM Video mediaGroup Property The Video mediaGroup property is used for setting or returning the name of the media group the video is a part of. Two or more <video> elements can be synchronized together using a media group. The Video mediaGroup property returns a string which represents the media group of the video. Syntax 2 min read HTML DOM Audio mediaGroup Property The Audio mediaGroup property is used for setting or returning the name of the media group the audio is a part of. Two or more <audio> elements can be synchronized together using a media group. Syntax: Return the mediaGroup property:audioObject.mediaGroupSet the mediaGroup property:audioObject 2 min read HTML | DOM Link Object HTML DOM Link Object is used to access HTML <link> element.Syntax: To Access a HTML element: document.getElementById("myLink"); To Create a New HTML element: document.createElement("LINK"); Property Values: ValueDescriptioncharsetIt assigns the character encoding of the linked documentcrossOri 2 min read HTML | DOM Object type Property The HTML | DOM Object type Property is used to set or return the value of a type attribute of a <object> element. The type attribute is used to specify the Internet type of MIME type of the Object. Syntax: It returns the type property.objObject.typeIt is used to set the type property.objObject 1 min read Like