The challenge asks you to create a new class and assign it to an existing element.
To create a new CSS class in this challenge, you should work between the <style> tags
You define a new class by using a dot “.” and the name of the new class without whitespaces:
.new-class
You use curly brackets to define the properties of the new class:
.new-class { }
You declare a property and its value with a colon “:” and a semicolon “;” inside the curly brackets:
.new-class { property: value; }
Now you have a new class!
To assign the new class to an existing element, you have to include it in the opening HTML tag using the “class” keyword:
<p class="new-class">This is a paragraph with a new class</p>
Please note that the classes must be included between double quotes (") and that you can assign multiple classes to the same element by using whitspaces:
<p class="new-class another-class">
The challenge itself is quite self-explanatory, the property you will use is width that takes an amount of pixels px as value.
You won’t ever need to nest an element inside the actual tag. Elements nest like <p><a href="#"></a></p>
but never like <p <style></style>>lorem ipsum dolor sit amet</p>
Styles like that always go in the head. The browser won’t know what to do with them if they’re anywhere else!
So, that goes in the head (like next to your .red-text class) and then you put the class into the element tag as an attribute. Just like you did with your h2 in the exercise before, see?