What are the default style property values ​​in HTML?

Related: How to find the default stylesheet for a browser?

Most HTML elements have style properties associated with them, such as color, font size, and padding. These style properties have default values. For example, the "color" style property associated with the "a" element (anchor) seems to have a default value of "# 000066".

What are these values ​​for all other elements?

+4
source share
2 answers

The default values ​​are determined by each browser separately. In many cases, they coincide, but sometimes they do not. That's why it is recommended to use CSS reset styles styles for default styles for the same values.

You can find some (unofficial) link to default browser styles:

CSS2.1 Default User Agent Property Table Element

Official Mozilla Default Style Sheet

+7
source

By default, css styles are used wherever a browser programmer chooses. Nothing prevents them from including default values ​​in the code.

0
source

Source: https://habr.com/ru/post/1312106/


All Articles