--- title: document.linkColor slug: Web/API/Document/linkColor tags: - DOM - DOM_0 - Dokumentacja_Gecko_DOM - Gecko - Wszystkie_kategorie translation_of: Web/API/Document/linkColor ---
{{ ApiRef() }}
{{ Deprecated_header() }} linkColor
pobiera/ustawia kolor odnośników w dokumencie.
kolor = document.linkColor document.linkColor =kolor
kolor
jest ciągiem zawierającym nazwę koloru (np. "blue", "darkblue", itp.) lub wartość szesnastkową, jak w HTML (np. "#fefdf8").document.linkColor
jest przestarzałe w DOM Level 2 HTML.
Rekomendowaną alternatywą jest pobranie/ustawienie własności CSS {{ Cssxref("color") }} na elemencie HTML anchor (<a>) links (np: a {color:red;}
).
Kolejną alternatywą document.body.link
mimo, że jest przestarzałe w HTML 4.01 szczególnie przy użyciu alternatywnego CSS.
document.linkColor = "blue";
{{ DOM0() }}
{{ languages( { "en": "en/DOM/document.linkColor" } ) }}