How to select CSS Pseudo-classes with inline styles?

Spread the love

Sometimes, we want to select CSS Pseudo-classes with inline styles.

In this article, we’ll look at how to select CSS Pseudo-classes with inline styles.

How to select CSS Pseudo-classes with inline styles?

To select CSS Pseudo-classes with inline styles, we can put our styles in the style element.

For instance, we write

<a href="http://www.example.com" id="link">example</a>
<style>
  #link:hover {
    text-decoration: none;
  }
</style>

to set the hover style of the link to have no underline with text-decoration: none;.

Conclusion

To select CSS Pseudo-classes with inline styles, we can put our styles in the style element.

Leave a Reply

Your email address will not be published. Required fields are marked *