+ 2
Help me add a another color to my h1
Hello Sololearners, Please help me add a another color to my h1(achaemenid empire title) https://code.sololearn.com/W7v7llaGg97k/?ref=app
6 Answers
+ 3
you can put the word or words inside a span and add inline style to it.
<h1 class="title">The <span style="color:red">Achaemenid Empire</span></h1>
+ 3
There are various ways.
First is inline style like in my first reply.
with css, you can define a class or a custom tag.
css using class:
.red{
color:red;
}
<h1 class="title">The <span class="red">Achaemenid Empire</span></h1>
css custom tag:
red{
color:red;
}
<h1 class="title">The <red>Achaemenid Empire</red></h1>
+ 2
you don't have to add the
'css custom tag' part.
also, you did not use the tag in your html
https://code.sololearn.com/WoLtkZO2O7v1/?ref=app
https://code.sololearn.com/WWD7662Uy575/?ref=app
0
Yes sir!
I will try that right away!
0
Bob_Li I tried but it didn't work,why?
0
Ooooooooh đČđŹ
Thanks sir!