Create a stylesheet rule. Targets unvisited links with :link.
Append it. The browser applies it without Document color properties.
Same UX goal. Unvisited-link color, without deprecated APIs.
Prefer static CSS in real projects (a <style> or stylesheet file).
Compatibility
Browser Support
Document.linkColor is a legacy Document color property. MDN marks it Deprecated. It may still work for compatibility, but CSS :link is the supported approach.
✓ Deprecated
Document.linkColor
Still readable in many browsers for old pages. Do not rely on it for new UI — use CSS link pseudo-classes.
It gets or sets the color of links within the document — historically the unvisited-link color. MDN recommends CSS instead.
Yes. MDN marks Document.linkColor as deprecated. Document color attributes are superseded by CSS. Prefer a:link { color: … } or styling anchor elements.
A string color name (such as blue) or a hexadecimal value (such as #ff0000). Setting null is converted to the empty string (MDN).
MDN notes the default linkColor in Mozilla Firefox is blue (#0000ee in hexadecimal).
linkColor styles unvisited links. vlinkColor styles visited links. alinkColor styles active (pressed) links. Modern CSS uses :link, :visited, and :active instead.
No. Style links with CSS — for example a:link { color: … }. Learn linkColor only to read or migrate old scripts.