Role of CSS :link Selector

CSSWeb DevelopmentFront End Technology

<p>Use the CSS&nbsp;:link selector to style all unvisited links. You can try to run the following code to implement the&nbsp;:link selector &minus;</p><h2>Example</h2><p><a class="demo" href="" rel="nofollow noopener noreferrer" target="_blank">Live Demo</a></p><pre class="prettyprint notranslate">&lt;!DOCTYPE html&gt; &lt;html&gt; &nbsp; &nbsp;&lt;head&gt; &nbsp; &nbsp; &nbsp; &lt;style&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a:link { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; background-color: orange; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;} &nbsp; &nbsp; &nbsp; &lt;/style&gt; &nbsp; &nbsp;&lt;/head&gt; &nbsp; &nbsp;&lt;body&gt; &nbsp; &nbsp; &nbsp; &lt;a href=&quot;;&gt;Demo Website&lt;/a&gt;<a href="" rel="nofollow" target="_blank"></a> &nbsp; &nbsp;&lt;/body&gt; &lt;/html&gt;</pre>
Updated on 30-Jun-2020 11:16:36