How do i add CSS to my current code


<.h2> CatPhotoApp </h.2>

How do it add CSS to this code above.

Your h2 element should be red.
Your style declaration should end with a ; .

For eg ifi have this code:
<h2>my title should be red</h2>
I can add styling to it like this:
<h2 color=“red”/>

1 Like

there are two ways one of them to add attribute=“property” inside the HTML tag like @hbar1st did, the second way to create a style tag and add your css inside it like

 <style> 
h2{
color: red;
}
</style>

Hello,
You can apply css in following way.

<h2 style="color:red;"> CatPhotoApp </h2>