Which property is used to make a font oblique ?
Last Updated :
01 Jun, 2022
In this article, we will see the property that makes the font oblique. A CSS font-style property is used to style the given particular text in a normal, italic, or oblique face from its font-family. Using the font-style property, we can assign importance along with decorating the specific text. It helps to create a better user experience.
In CSS, if we want to provide some different designs to any type of text, then we can make use of CSS font-style property.
- oblique: This font-style specifies an angle for the slant of the text. The displayed font style is oblique in the browser.
Syntax:
font-style: oblique
Example 1: This example illustrates the font-style whose value is set to oblique.
HTML
<!DOCTYPE html>
< html >
< head >
< style >
p.a {
font-style: oblique;
}
</ style >
</ head >
< body >
< h1 style = "color:green;" >GeeksforGeeks</ h1 >
< h3 >Oblique font-style Property</ h3 >
< p class = "a" >GeeksforGeeks</ p >
</ body >
</ html >
|
Output:
Example 2: This example illustrates the font-style whose value is set to oblique or h6 tag
HTML
<!DOCTYPE html>
< html >
< head >
< style >
h6.a {
font-style: oblique;
}
</ style >
</ head >
< body >
< h1 style = "color:green;" >GeeksforGeeks</ h1 >
< h3 >Oblique font-style Property</ h3 >
< marquee >< h6 class = "a" >GeeksforGeeks</ h6 ></ marquee >
</ body >
</ html >
|
Output:
Share your thoughts in the comments
Please Login to comment...