Class and ID Selectors | CSS, HTML | Foundations The_Odin_Project Remix (CSS, HTML) | 03/06 | freeCodeCamp | 2024
CSS Foundations Exercise B
Objective: There are several elements in the HTML file provided, which you will have to add either class or ID attributes to. You will then have to add rules in the CSS file provided using the correct selector syntax.
User Stories
-
You should see a yellow background for all odd numbered elements in the list.
-
You should have a class selector used for all odd numbered elements in the list.
-
You should see that the second element in the list has blue text and a font-size of 36px.
-
The font-size and text color on the second element should be set by using an id attribute.
-
You should see that the third element in the list has a font-size of 24px.
-
The font-size on the third element should be set by using a class attribute.
-
You should see that the fourth element in the list has a red background, a font-size of 24px, and a font-weight of bold.
-
The font-size of the fourth element should be set with a class attribute. The font-weight and the color should be set with an id attribute.