Hosting Solutions
mobile_logo Table of Contents


The <link> element is used to specify relationships between your web document and other external file resources. This tells the browser software to fetch that resource and apply it to your page according to what type of link it is.

Code Example

<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="style/style.css"> <link rel="icon" href="favicon.ico" type="image/x-icon"> </head> <body> </body> </html> Use with the 'media' attribute to create responsive layouts. Visitors with different screen sizes will be served up the appropriate style sheet for their particular screen size. In the style sheets everything about the layout could be altered to suit small or large screens. <head> <link rel="stylesheet" media="screen and (min-width: 0px)" href="small.css"> <link rel="stylesheet" media="screen and (min-width: 1000px)" href="medium.css"> <link rel="stylesheet" media="screen and (min-width: 1400px)" href="large.css"> </head>


globals - the global attributes common to all elements possible values: see global attribute list href - specify the URL of the target file to link in the document possible values: "path/to/file" crossorigin - specify cross-origin restrictions possible values: "anonymous", "use-credentials" rel - specify the relationship(s) between the external file and your document possible values: "space separated list of link types" Link Types: "alternate", "author", "bookmark", "help", "icon", "license", "next", "nofollow", "noreferrer", "prefetch", "prev", "search", "stylesheet", "tag" media - specify the media type of the target external file resource possible values: "aural", "braille", 'handheld", 'print", "projection", "screen", "tty", "tv" hreflang - specify language of the external file possible values: "a valid BCP 47 language tag" type - specify the mime type of the destination file possible values: "valid MIME type" sizes - specify icon sizes if the link type is icon possible values: "any", "space separated size list(example: 16x16 32x32 48x48)"

Official Documentation



aabbraddressareaasidearticleaudiobbasebdobdiblockquotebodybrbuttoncanvascaptioncitecodecolcolgroupdatadatalistdddeldetailsdfndialogdivdldtemembedfieldsetfigcaptionfigurefooterformh1 h2 h3 h4 h5 h6headheaderhrhtmliiframeimginputinskbdkeygenlabellegendlilinkmainmapmarkmetameternavnoscriptobjectoloptgroupoptionoutputpparampreprogressqrb rp rt rtc rubyssampscriptsectionselectsmallsourcespanstrongstylesub supsummarytabletbodytdtemplatetextareatfootththeadtimetitletrtrackuulvarvideowbr