HTML <link> href Atrybut

❮ Znacznik HTML <link>

Przykład

Link do zewnętrznego arkusza stylów:

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

Definicja i użycie

Atrybut określa lokalizację ( hrefURL) zasobu zewnętrznego (najczęściej plik arkusza stylów).


Obsługa przeglądarki

Attribute
href Yes Yes Yes Yes Yes

Składnia

<link href="URL">

Wartości atrybutów

Value Description
URL The URL of the linked resource/document.

Possible values:

  • An absolute URL - points to another web site (like href="http://www.example.com/theme.css")
  • A relative URL - points to a file within a web site (like href="/themes/theme.css")

❮ Znacznik HTML <link>