79284299

Date: 2024-12-16 10:16:06
Score: 1.5
Natty:
Report link

Like @C3roe says this code snippet works great i think. In the css code #page-container :not(a) > h2 excludes the a tags with h2

#page-container > h2,
#page-container :not(a) > h2 {
  font-size: 20px;
  color: #df1425;
  font-family: Arial, sans-serif;
}
<div id="page-container">
      <h2>I want this to have styling changes</h2>
      <a>
        <h2>
          I don't want this to have styling changes because this is inside a tag
        </h2></a
      >
      <div>
        <h2>I want this to have styling changes</h2>
        <a>
          <h2>
            I don't want this to have styling changes because this is inside a
            tag
          </h2></a
        >
      </div>

Reasons:
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • Has code block (-0.5):
  • User mentioned (1): @C3roe
  • Low reputation (0.5):
Posted by: webworm84