Fandom

HTML & CSS Wiki

Link

649pages on
this wiki
Add New Page
Comments0 Share
Not be be confused with <a/> , the element that creates hyperlinks.

The void HTML <link /> element defines the relationship between a document and an external resource. It is typically used to link to external style sheets. This element can only be inserted within the <head> section, but it can appear any number of times. It can also be used to link to your Favicon or external stylesheet.


Attributes

Attribute Value Description
charset char_encoding Deprecated
href URL The target URL of the resource.
hreflang language_code Defines the base language of the target URL.
media screen
tty
tv
projection
handheld
print
braille
aural
all
Specifies on what device the document will be displayed.
rel alternate
archives
author
first
help
icon
index
last
license
next
pingback
prefetch
prev
search
stylesheet
sidebar
tag
up
Specifies the relationship between the current document and the target URL. Use only if the href attribute is present.
rev reversed relationship Deprecated:
sizes number
any
Defines sizes of the linked resource. Can be used when rel="icon".
target _blank
_self
_top
_parent
frame_name
Deprecated
type MIME_type like:
text/css
text/javascript
image/gif
Specifies the MIME type of the target URL.


HTML example:

<head>
<link rel="stylesheet" type="text/css" href="MyCSS.css" />
<link rel="icon" href="Favicon.ico" />
</head>

See Also

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.