+ 1
Hi guys! Just wanna ask why I thi isn't working. I just want a custom font in the word "Hello" and have a margin from the left.
<style> p.m { margin-left: 30px; } p.a { font-family: "Rockwell", regular; } </style> <p class="m" class="a"> Hello</p>
4 Respuestas
+ 3
Alian Axel Nieto Crooc Your error is in HTML you can't use two class attributes.
<style>
p.m {
margin-left: 30px;
font-family: "Rockwell", serif;
font-weight: regular;
}
</style>
<p class="m"> Hello </p>
One class name is enough.
I hope it helps you. Happy Coding!!
+ 2
You are using the wrong format.
You cannot have 2 class attributes.
Try this:
<style>
p.m {
margin-left: 30px;
}
p.a {
font-family: "Rockwell", regular;
}
</style>
<p class="m a"> Hello </p>
Or
You can use them under the same class name if you want.
+ 1
You may have as many class names as you like but only 1 class attribute is allowed.
Correct
<p class="m a"> Hello </p>
Incorrect
<p class="m" class="a"> Hello</p>
+ 1
Thanks y'all