Source code
Revision control
Copy as Markdown
Other Tools
<?xml version="1.0"?>
<!DOCTYPE html>
<style>
<![CDATA[
a { display: block; width: 100%; height: 100% }
:link { background: red }
:visited { background: green }
]]>
</style>
<script>
<![CDATA[
var a = document.documentElement;
getComputedStyle(a, "").backgroundColor; // flush style
a.href = "visited-page.html";
getComputedStyle(a, "").backgroundColor; // flush style
document.documentElement.removeAttribute("class");
]]>
</script>
</a>