❐CSS❐

❐wD Learn

CSS

CSS Introduction

CSS Selectors

CSS Color

CSS Background

CSS Border

CSS Margin

CSS Padding

CSS Box Model

CSS Text

CSS Font

CSS Link

CSS List

CSS Overflow

CSS Display

CSS Combinators

CSS Pseudo-classes

CSS Navigation Bar

CSS Hover

CSS Z-index

CSS Media Queries

CSS Shadow

CSS 2D Transform

CSS Animations

CSS Button

CSS FlexBox

CSS Grid

CSS Pagination

CSS Hover CSS hover is used to enhance the user experience.

We can change the appearance or the behavior of the HTML element(s) when the user hovers over it.

Example


<html lang="en">
<head>
<style>
#p1 {
color: yellow;
}
#p1:hover {
color: red;
}

#p2 {
border: 2px solid red;
}
#p2:hover {
border: 5px solid purple;
}
</style>
</head>
<body>
<p id="p1">CodeWithmey</p>
<p id="p2">Developer and Founder of this website</p>
</body>
</html>