Find browser’s default CSS rules
25 September 2022 (Updated 9 October 2022)
On this page
Authoritative references
Browsers ship default styles for many HTML elements like h1
, input
, p
, and so on. You can find these default styles here:
- Chrome (Blink)
- Chrome/Safari (WebKit)
- Firefox (Gecko) Or, browse to
resource://gre-resources/
and look athtml.css
. - Internet Explorer (Trident) older versions
You can confirm that the above references show the correct default styles by using your browser’s DevTools. For example, in Chrome, default browser styles have the greyed out user agent stylesheet
next to them:
Web UI to search styles
There’s also browserdefaultstyles.com that provides a web UI for searching those styles. This project seems to collect all the styles from the different browsers in one file and query that file from the web UI. I’m not sure how up to date its data is. Can look into it when I have more time.
Sources
Tagged:
CSS
Thanks for your comment 🙏. Once it's approved, it will appear here.
Leave a comment