body{
background:lightblue;
font-family:'Times New Roman', Arial;
}
Set the fonts by CSS
You can select your font name by CSS. The code is given below:
Set the line height by CSS
<html>
<head>
<style>
body{
background:lightblue;
}
#ex1{
line-height:1.5em;
}
#ex2{
line-height:3em;
}
</style>
</head>
<body>
<div id="ex1">
This paragraph has<br/>
1.5em line height
<div>
<div id="ex2">
This paragraph has<br/>
3em line height
<div>
<body>
</html>
The output is given below:
Text Transformation by CSS
<html>
<head>
<style>
body{
background:lightblue;
}
h1{
text-transform:uppercase;
}
h2{
text-transform:lowercase;
}
h3{
text-transform:Capitalize;
}
</style>
</head>
<body>
<h1>This is uppercase paragraph</h1>
<h2>This is lowercase paragraph</h2>
<h3>This is capitalize paragraph</h3>
<body>
</html>
The output is given below:
Decorate text using CSS
<html>
<head>
<style>
body{
background:lightblue;
}
h1{
text-decoration:none;
}
h2{
text-decoration:underline;
}
h3{
text-decoration:overline;
}
h4{
text-decoration:line-through;
}
h5{
text-decoration:blink;
}
</style>
</head>
<body>
<h1>There is no text text decoration</h1>
<h2>Using underline by CSS</h2>
<h3>Using overline by CSS</h3>
<h4>Using line-through by CSS</h4>
<h5>Using Blink by CSS</h5>
<body>
</html>
The output is given below:
Change Text alignment by CSS
<html>
<head>
<style>
body{
background:lightblue;
}
.center{
text-align:center;
}
.right{
text-align:right;
}
.left{
text-align:left;
}
</style>
</head>
<body>
<div class="center">
This is center class
</div>
<div class="right">
This is center class
</div>
<div class="left">
This is center class
</div>
<body>
</html>
The output is given below:


