Set font size to 120% for H1 in HTML and CSS

Description

The following code shows how to set font size to 120% for H1.

Example


<!-- w w  w.  j a v  a2 s.co m-->



<html>
<head>
<title>Set font size to 120% for <H1></title>
<style type="text/css">
h1 {
font-size: 120%;
}
</style>
</head>
<body>
<h1>Title of Page</h1>
<p>This is a sample paragraph with a <a href="http://www.java2s.com" class="warning">link</a>. After link. <em class="warning"> in em warning</em>. After em.</p>
</body>
</html>

Click to view the demo

The code above generates the following result.

Set font size to 120% for H1 in HTML and CSS