Snogard
Snogard

Reputation: 21

what is the difference betwwen normal and initial (css)

What is difference between normal and initial in this properties? Don't both do the same thing?

1st example

<p class="a">This is a paragraph, normal.</p>
<p class="b">This is a paragraph, italic.</p>
<p class="c">This is a paragraph, oblique.</p>

p.a {
    font-style: normal;
}

p.b {
   font-style: italic;
}

p.c {
    font-style: oblique;
}

2nd example

<p class="normal">This is a paragraph.</p>
<p class="light">This is a paragraph.</p>
<p class="thick">This is a paragraph.</p>
<p class="thicker">This is a paragraph.</p>

p.normal {
    font-weight: normal;
}

p.thick {
    font-weight: bold;
}

p.thicker {
    font-weight: 900;
}

Upvotes: 2

Views: 162

Answers (1)

Quentin
Quentin

Reputation: 943142

initial is a value that can be given to any property to set it back to its default value.

normal happens to be the default value for those two properties.

Upvotes: 2

Related Questions