HTML学习笔记(2)——其他标签

来源:互联网 发布:泛洪算法 编辑:程序博客网 时间:2024/06/04 20:06

1、头部

<head></head>  包含文档的概要信息,元信息。

head标签里合法的标签有:<base>,<link>,<meta>,<title>,<style>,<script>

作用:①   为html页面添加描述信息,用于搜索引擎抓取。

                   使用name属性,配合content属性来实现:

             ②   引入CSS文件

                  <link rel="stylesheet" herf="文件位置"type="text/css" />

             ③   为html文档使用语言类型进行说明

                   <html lang="ch-CN">  </html>

             ④   用html标签实现网页跳转

                   <meta http-equiv="refresh" content="等待秒数;url=目标网页" />

             ⑤   告诉浏览器要不要加载页面缓存

                   <meta http-equiv="pragma" content="no-cache" />

<!doctype html><html lang="zh-CN"> <head>  <meta charset="UTF-8">  <meta name="Keywords" content="其他标签">  <meta name="Description" content="这个HTML文档用于介绍head标签和iframe标签">  <meta http-equiv="refresh" content="100;url=http://www.baidu.com/" />  <meta http-equiv="pragma" content="no-cache">  <title>其它标签</title> </head> <body> <iframe src="http://www.baidu.com/" width="100%" height="500" frameborder="0" scrolling="auto"></iframe> </body></html>


2、创建一个包含另外一个文档的内联框架

使用<iframe> </iframe>

其具有的属性有:

            ①width;height               定义其长宽。

            ②frameborder                 值为0或者1,设置其是否有边框。

            ③scrolling                        值为yes,no,auto,设置是否有滚动条或者是自动。










0 0