CSS-এ font-size প্রপার্টি সেট করতে em ব্যবহার করুন। টেক্সটের জন্য পিক্সেল নির্ভুলতা দরকার হলে এটি উপযোগী। ডিফল্টভাবে ১em = ১৬px, এবং ২em = ৩২px।
উদাহরণ
<!DOCTYPE html>
<html>
<head>
<style>
.demo {
text-decoration: overline;
text-decoration-color: yellow;
font-size: 1.3em;
}
</style>
</head>
<body>
<h1>Examination Details</h1>
<p class="demo">Exam on 20th December.</p>
<p class="demo2">Exam begins at 9AM.</p>
</body>
</html>
আউটপুট

উদাহরণ
আরেকটি উদাহরণ:
<!DOCTYPE html>
<html>
<head>
<style>
div {
text-align: justify;
text-justify: inter-word;
color: white;
background-color: gray;
font-size: 1.5em;
}
</style>
</head>
<body>
<h2>Demo Heading</h2>
<div>This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. This is demo text. </div>
</body>
</html>
আউটপুট
