Solution 1 :

you need to removed extra colon : from your CSS code

#italic {
    font-style: italic;
}

or either you can used this tag <i></i> for italic

Solution 2 :

like that you entered something extra in your code.

#italic {
font-style: **:** italic;
}

You must remove the second : so your code will be right 🙂

Problem :

I have my HTML code and my CSS code and when I integrate them everything works except for the italic and I don’t know why; can someone explain?

<div id="italic">
    <p >
        <span id="italic">Bears care deeply about family members.
            They will risk their lives and even fight to the death in order
            to save a cub or sibling from danger.
        </span>
    </p>
</div>

and the css is :

.subbox {
  border : 1px solid lightgray;
  padding : 10px;
  flex-wrap: wrap;
}

#italic {
    font-style: : italic;
}

.bold {
    font-weight: bold;
}

.removingb {
    list-style-type: none;
} 

Comments

Comment posted by 0xedb

should be

Comment posted by jigsaw.w3.org/css-validator

Typo. Extra

Comment posted by Quentin

HTML is invalid too. IDs must be

Comment posted by jigsaw.w3.org/css-validator

thank you guys and thank you for this tool

By