CSS font | font weight w3c
ExampleSetdifferentfontstylesforthreeparagraphs:p.a{ font-style:normal;}p.b{ font-style:italic;}p.c{ font-style:oblique;}TryitYourself»[1]DefinitionandUsageThefont-stylepropertyspecifiesthefontstyleforatext.Showdemo❯[2]Defaultvalue:normalInherited:yesAnimatable:no.Readaboutanimatable[3]Version:CSS1JavaScriptsyntax:object.style.fontStyle="italic"Tryit[4]BrowserSupportThenumbersinthetablespecifythefirstbrowserversionthatfullysupportstheproperty.Propertyfont-style1.04.01.01.07.0CSSSyntaxfont-s...
ExampleSet different font styles for three paragraphs:
p.a { font-style: normal;}p.b { font-style: italic;}
p.c { font-style: oblique;}
Try it Yourself »[1] Definition and UsageThe font-style property specifies the font style for a text.
Show demo ❯[2]
Default value: normal Inherited: yes Animatable: no. Read about animatable[3] Version: CSS1 JavaScript syntax: object.style.fontStyle="italic" Try it[4] Browser SupportThe numbers in the table specify the first browser version that fully supports the property.
Property font-style 1.0 4.0 1.0 1.0 7.0 CSS Syntaxfont-style: normal|italic|oblique|initial|inherit;
Property Values Value Description Demo normal The browser displays a normal font style. This is default Demo ❯[5] italic The browser displays an italic font style...