It is worth noting how the HTML rendering engine determines what to use if conflicting styles are set on any given element. For example, take the case of color:
If an element has the color property set directly on it (DhElement.setColor), then the color defined by the color property is used. Otherwise, if an element has a style object on it (DhElement.setStyle) and that object has the color property set, then that value is used. Failing to find a color or a style, the same process is used with the element's container (DhElement.getParent), and failing that, with the container of that container and so on. The process continues up to the document. If the document doesn't have a color property set on it anywhere, the environment (either browser settings or some other environment settings) determine the color to use.
This process is called cascading styles because the properties cascade down the containment hierarchy.