Help us make DevTools Tips better! Fill out this survey to tell us more about your DevTools habits and frustrations.
Copy CSS selector of an element
In the Element tree, right click on the element and select,
- In Chrome and Edge,
- In Firefox,
- In Safari,
> document.querySelector("#maincontent > div > h2")
<h2>104 DevTools Tips</h2>