源代码:
<!DOCTYPE html> <html> <head> <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>Specifying the font-size in px allows Internet Explorer 9, Firefox, Chrome, Opera, and Safari to resize the text.</p> <p><b>Note:</b> This example does not work in IE, prior version 9.</p> </body> </html>
运行结果:
IT自学教程工具