HTML代码
1 <html> 2 <head> 3 <!--<title>定义网页标题,显示在浏览器的标题--> 4 <title>网页标题</title> 5 <!--<base> 用于设定浏览器中文件的绝对路径,网页中的文件只需要写下文件的相对路径即可,这个路径就是base中指定下的路径--> 6 <base> 7 <!--<link>设置外部文件的链接标记,用于确定本页面和其他文档之间的关系--> 8 <link rel="stylesheet" type="text/css" href="2.css"> 9 <!--name 用于在网页中加入一些关于网页的描述信息 10 http-equiv属性用于在HTML文档中模拟HTTP协议的响应消息头 11 name属性 12 keywords关键字 13 description描述 14 http-equiv属性 15 content-type文字类型 16 --> 17 <meta name="keywords" content="meta实例"> 18 <meta http-equiv="content-type" content="charset=gb2312"> 19 </head> 20 <!--<body>在他中放置网页中所有内容 21 bgcolor背景颜色 22 text页面颜色 23 --> 24 <body> 25 <h1>文本</h1> 26 <p>我的世界</p> 27 </body> 28 </html>
CSS代码
1 /* CSS Document */ 2 p{ 3 font-size:1cm; 4 color:red; 5 }