现在的位置: 首页 > 综合 > 正文

HTML基本框架

2013年08月16日 ⁄ 综合 ⁄ 共 803字 ⁄ 字号 评论关闭
<html>
<head>
     <title>title</title>
</head>
<body>
</body>

</html>
设置基底网址
     <base href = “文件路径” target = “目标窗口”>
一个html文件中只能有一个<base>标记,同时该标记只能放在头部文件中
设置基准文字basefont
     对文字的基本定义包括字形字号和字体颜色
     <html>
     <head>
          <basefont face=”宋体” size=”h2″ color=”red”>
     </head>
     </html>
定义元信息。该标记定义页面的一些信息,但这些信息并不显示在网页中,只在源文件中显示
基本语法
     <meta http-equiv=”" name=”" content=”">
http-equiv用于设置一个http标题域,但确定值由content决定,name属性用于设置元信息出现的形式,content用于设置元信息的内容
设置页面关键字
     <meta name=”keywords” content=”xxxx”>
设置页面过期时间
     <meta http-equiv=”expires” content=”value”>
主体内容在<body>和</body>中
设置页面背景
基本语法
<body bgcolor=”">
</body>
如<body bgcolor=”blue”>
设置页面间距topmargin ,leftmargin,rightmargin,bottommargin
<body topmargin=value rightmargin=value leftmargin=value rightmargin=value bottommargin=value>
设置正文颜色
<body text=”">
</body>
可以同时设置正文的多个属性
<body text = “white” bgcolor=”red”>
</body>

抱歉!评论已关闭.