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="http://tpcg.io/PeY9q5" 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;https://www.example.com&quot;&gt;Demo Website&lt;/a&gt;<a href="https://www.example.com/" rel="nofollow" target="_blank">https://www.example.com/</a> &nbsp; &nbsp;&lt;/body&gt; &lt;/html&gt;</pre>
raja
Updated on 30-Jun-2020 11:16:36

Advertisements