This property is used to specify whether an element show pointer events and whether or not show on the pointer.
Syntax:
pointer-events: auto|none;
Default Value: auto
Property values:
- auto: This property is used to specify that an element must react to pointer events.
- none: This property is used to specify that an element does not react to pointer events.
Example: In this example, we are using pointer-events: auto; property.
HTML
<!DOCTYPE html>
< html >
< head >
< title >
CSS | pointer-events Property
</ title >
< style >
p.geeks {
pointer-events: auto;
}
h1,
h2 {
color: green;
}
body {
text-align: center;
}
</ style >
</ head >
< body >
< CENTER >
< h1 >GeeksForGeeks</ h1 >
< h2 >pointer-events:auto;</ h2 >
< p class = "geeks" >
< a href = "#" >GeeksforGeeks </ a >
</ p >
</ CENTER >
</ body >
</ html >
|
Output:

Example: In this example, we are using pointer-events: none; property.
html
<!DOCTYPE html>
< html >
< head >
< title >
CSS | pointer-events Property
</ title >
< style >
p.geeks {
pointer-events: none;
}
h1,
h2 {
color: green;
}
body {
text-align: center;
}
</ style >
</ head >
< body >
< h1 >GeeksForGeeks</ h1 >
< h2 >pointer-events:none;</ h2 >
< p class = "geeks" >
< a href = "#" >GeeksforGeeks</ a >
</ p >
</ body >
</ html >
|
Output:

Supported Browsers: The browsers supported by pointer-events Property are listed below:
- Google Chrome 1.0
- Edge 12.0
- Internet Explorer 11.0
- Firefox 1.5
- Opera 9.0
- Safari 4.0
Whether you're preparing for your first job interview or aiming to upskill in this ever-evolving tech landscape,
GeeksforGeeks Courses are your key to success. We provide top-quality content at affordable prices, all geared towards accelerating your growth in a time-bound manner. Join the millions we've already empowered, and we're here to do the same for you. Don't miss out -
check it out now!