Set font size using px

Example analysis:

Use px in the font-size attribute to set the text size, which can completely control the text size.

px: pixel (a point on the computer screen)

Description: px is an absolute unit, specifying the absolute size.

Continuing Learning
||
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>php(php.cn)</title>
<style>
h1 {font-size:40px;}
h2 {font-size:30px;}
p {font-size:14px;}
</style>
</head>
<body>
<h1>This is heading 1</h1>
<h2>This is heading 2</h2>
<p>This is a paragraph.</p>
<p> Internet Explorer 9, Firefox, Chrome, Opera, Safari </p>
<p><b>:</b> IE9</p>
</body>
</html>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
submitReset Code
图片放大关闭