# freeCodeCamp.org

**URL:** <https://forum.freecodecamp.org/t/freecodecamp-org/701226>\
**Category:** General\
**Created:** [July 17, 2024, 3:45am UTC](https://forum.freecodecamp.org/t/freecodecamp-org/701226 "2024-07-17T03:45:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sandeep.gohain91](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/sandeep.gohain91/32/328651_2.png) [@sandeep.gohain91](https://forum.freecodecamp.org/u/sandeep.gohain91)\
**Post date:** [July 17, 2024, 3:45am UTC](https://forum.freecodecamp.org/t/freecodecamp-org/701226/1 "2024-07-17T03:45:32Z")

</div>

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/2022/responsive-web-design/learn-more-about-css-pseudo-selectors-by-building-a-balance-sheet/step-46)**
>
> Learn to Code — For Free

code1:  
span:not(.sr-only){  
font-weight:normal;  
}

code2:  
span.description{  
font-weight:normal;  
}

Will both code1 and code2 serve the same purpose?

---

<div class="post-metadata">

**Author:** ![Teller](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/teller/32/412338_2.png) [@Teller](https://forum.freecodecamp.org/u/Teller)\
**Post date:** [July 17, 2024, 11:14am UTC](https://forum.freecodecamp.org/t/freecodecamp-org/701226/2 "2024-07-17T11:14:43Z")

</div>

Hi @sandeep.gohain91

The answer will depend on what the `css` values are for the span elements, and `.sr-only` and `.description` classes, and the purpose you are looking for.

Consider the following code.

```auto
<span>Test</span>
<span class="sr-only">Test</span>
<span class="description">Test<span>

span {
  color: red;
}

span:not(.sr-only) {
  font-weight:normal;
  color: yellow;
}

span.description {
  font-weight:normal;
  color: green;
}

```

The first span element will have red text.  
The second span element will have yellow text.  
The third span element will have green text.

Also, the default `font-weight` is `normal`, so no change may appear.

Happy coding

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 8, 2025, 3:45pm UTC](https://forum.freecodecamp.org/t/freecodecamp-org/701226/3 "2025-01-08T15:45:26Z")

</div>

Closed on January 8, 2025, 3:45pm UTC


