HTML
CSS
PHP
Deno
Examples
Do It Yourself
Blog
Type in your code below
Run
<!DOCTYPE html> <html><head> <style> a{ border: solid #000000; padding:10px; display:block; margin:10px 0; } a.services:hover{ border-color: #f00; color: #f00; } </style> </head> <body> <div style="padding: 30px;"> <a href="#!"> Over Me (i don't have a class="services") </a> <a class="services" href="#!"> Over Me (i have a class="services") </a> <a href="#!"> Over Me (i don't have a class="services") </a> </div> <ul> <h2>NOTE:</h2> <li>When you over the element with no class="services", the element does not change while the element with class="services" changed to color RED with border color RED.</li> </ul> </body> </html>
Related Chapters
CSS Pseudo-Classes Selectors
CSS Positions
CSS Grouping
CSS Selectors
Related Examples
HTML CSS Tag Name Selector Description
CSS Pseudo Class :nth-child()
CSS Links pseudo last Child
CSS Selectors Grouping Intro
CSS Links Pseudo Class