HTML <link> Etiketi


Örnek

Harici bir stil sayfasına bağlantı:

<head>
  <link rel="stylesheet" href="styles.css">
</head>

Tanım ve Kullanım

<link>etiketi, geçerli belge ile harici bir kaynak arasındaki ilişkiyi tanımlar .

Etiket <link>, çoğunlukla harici stil sayfalarına bağlantı vermek veya web sitenize bir favicon eklemek için kullanılır.

Öğe boş bir öğedir , <link>yalnızca öznitelikleri içerir.


Tarayıcı Desteği

Element
<link> Yes Yes Yes Yes Yes


Öznitellikler

Attribute Value Description
crossorigin anonymous
use-credentials
Specifies how the element handles cross-origin requests
href URL Specifies the location of the linked document
hreflang language_code Specifies the language of the text in the linked document
media media_query Specifies on what device the linked document will be displayed
referrerpolicy no-referrer
no-referrer-when-downgrade
origin
origin-when-cross-origin
unsafe-url
Specifies which referrer to use when fetching the resource
rel alternate
author
dns-prefetch
help
icon
license
next
pingback
preconnect
prefetch
preload
prerender
prev
search
stylesheet
Required. Specifies the relationship between the current document and the linked document
sizes HeightxWidth
any
Specifies the size of the linked resource. Only for rel="icon"
title   Defines a preferred or an alternate stylesheet
type media_type Specifies the media type of the linked document

Genel Özellikler

Etiket ayrıca HTML'deki Global Nitelikleri<link> de destekler .


Etkinlik Özellikleri

Etiket ayrıca HTML'deki Etkinlik Niteliklerini<link> de destekler .


İlgili Sayfalar

HTML eğitimi: HTML Stilleri

HTML DOM referansı: Bağlantı Nesnesi


Varsayılan CSS Ayarları

Çoğu tarayıcı, <link>öğeyi aşağıdaki varsayılan değerlerle görüntüler:

link {
  display: none;
}