I know how to override css using !important but what if the HTML is
<p style="font-weight:bold;">hello</p>
I do not want to affect the other P but only P with style="font-weight:bold;"
You can use the style attribute in css as you would with any other attribute.
p[style*="font-weight:bold"] {
font-weight: bolder;
}
You can do this by:
p[style*="font-weight: bold"] {
/* some styles */
}
You can also use this technique for selecting HTML tags with other attributes like target.
You can look up here for more information on selectors: