JSFiddle - React, Tailwind, and code Playground
HTML
<section>
<h1>World news</h1>
<article id="news1">...</article>
<article id="news2">...</article>
<article id="news3">...</article>
</section>
<section>
<h1>Sports</h1>
<article id="sports1">...</article>
<article id="sports2">...</article>
<article id="sports3">...</article>
</section>
JavaScript
$(document).ready(function(){
$("article:first-of-type").css("background-color","red"); // changed to red just to see
///$("article:first-of-type").css("background-color", "#f2f2f2"); from question
});