Imagine having a table in HTML and adding the following CSS:
* { font-family: Verdana }
table { font-family: Arial }
Despite specifically setting the font-family to Arial for the table, it continues to display as Verdana. However, if another property like background-color: blue
is added, then the style takes effect. It appears that there is some complexity with inheritance at play here that I am not grasping fully. While the asterisk selector targets all elements, the table
selector should override it for its child elements given its higher specificity.