CSS font-style 속성은 요소의 텍스트에 대해 normal, italic 또는 oblique 스타일을 지정하는 데 사용됩니다.
구문
CSS font-style 속성의 구문은 다음과 같습니다 -
Selector {
font-style: /*value*/
} 예시
다음 예제는 CSS 글꼴 스타일 속성을 보여줍니다 -
<!DOCTYPE html>
<html>
<head>
<style>
h2 {
font-style: italic;
background-color: steelblue;
color: white;
}
p {
font-style: oblique 10deg;
}
</style>
</head>
<body>
<h2>Fortran Tutorial for Beginners</h2>
<p>Fortran, as derived from Formula Translating System, is a general-purpose, imperative programming language.</p>
<p>It is used for numeric and scientific computing.</p>
</body>
</html> 출력
이것은 다음과 같은 출력을 제공합니다 -

예시
<!DOCTYPE html>
<html>
<head>
<style>
h3 {
font-style: italic;
background-color: mediumpurple;
color: white;
text-align: center;
}
li {
font-family: "Comic Sans MS", cursive;
font-style: oblique 5deg;
}
</style>
</head>
<body>
<h3>Developers Best Practices Tutorial</h3>
<ul>
<li>Documentation is the key</li>
<li>Follow the standards</li>
<li>Write to be Reviewed</li>
</ul>
</body>
</html> 출력
이것은 다음과 같은 출력을 제공합니다 -
