Create a stylesheet rule. Targets links in the :visited state.
Append it. The browser applies it without Document color properties.
Same UX goal. Visited-link color, without deprecated APIs.
Prefer static CSS in real projects (a <style> or stylesheet file).
Compatibility
Browser Support
Document.vlinkColor is a legacy Document color property. MDN marks it Deprecated. It may still work for compatibility, but CSS :visited is the supported approach.
✓ Deprecated
Document.vlinkColor
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 that the user has visited in the document (MDN).
Yes. MDN marks Document.vlinkColor as Deprecated. Document color attributes are superseded by CSS. Prefer styling a:visited.
A string color name (such as red or purple) or a hexadecimal color (such as #551a8b). Setting null is converted to the empty string.
MDN notes the default vlinkColor in Mozilla Firefox is purple (#551a8b in hexadecimal).
Legacy Document properties include linkColor (unvisited), vlinkColor (visited), and alinkColor (active/pressed). Modern CSS uses :link, :visited, and :active instead.
No. Style visited links with CSS — for example a:visited { color: … }. Learn vlinkColor only to read or migrate old scripts.