What is user agent stylesheet

April 01, 2020 | 13 comments

What is user agent stylesheet

Every browser comes with some default style information. Which is used in case a particular webpage does not contains any style defined. For example if a web page contains standard HTML tags like H1, Button, Input etc. but does not contains any css along side the HTML. In that case the browser still needs to render the HTML tags to the end user. To facilitate this each browser like Chrome, Safari, Firefox etc comes with a default style sheet.
The default style sheet provided by the browser it self is called user agent stylesheet. Following screenshot shows an example of css for H1 provided by user agent style sheet on Chrome.


To override the browser specific defaults we can employ multiple techniques such as Reseting the user agent CSS or Normalize the user agent CSS. CSS Reset tries to remove all the default browser supplied styles where as Normalize CSS tries to standardize the different defaults across all browsers
Key points
  • Different browsers set different default CSS rules.
  • Default CSS links for some of the browsers are given bellow.
  • We can reset the default browser specific style.
  • We can also normalize the browser specif style to have standardize looks across all browsers.

User Agent Style References

13 comments :

Please leave your message queries or suggetions.