CSS SELECTOR help

been googling this a while and cant see to find a answer. what is the correct css syntax to select individual A TAG in the DIV without having to give them class under this html code.
Only thing i could find is
a:first-child and
a:nth-child(#)

HTML>
BODY>
DIV>
A>
A>
A>
/D>
D>
A>
A>
A>
/D>
D>
A>
A>
A>
/D>
/BODY>

a {
hover-color:green;
}

a {
text-size:30;
}

etc. I hope this helped!

1 Like

that targets all a tags , i want to able to target them individually

You will have to use an ID. That should work.

1 Like

Hi there!

See this page on classes and IDs. As @naomipinkflower says, you’ll need (and probably want) to use one of the two to reference an individual element.

Alternatively, you have the option to style an element inline, by using the element style property. For example:

<p style="color:white; text-align:center;">Hello, World!</p>

This <p> element will have a color “white”, and will be center aligned. If you’re only using this code once, and you’re okay with it being written this way, it might be best to do it this way.

You can take a look at this page relating to the different style formats.