HTML文件基本标记(一)-<head>、<title>、<meta>

来源:互联网 发布:阿里云服务器 翻墙 编辑:程序博客网 时间:2024/05/21 18:56

关于HTML文件head、title、meta标记的使用

<!DOCTYPE html><html><head><!-- HTML使用http-equiv来设置标头属性名称;使用charset来设置网页的内码语系 --><meta charset="UTF-8"><!--HTML使用name定义keyword来设置网页的关键字属性  --><meta name="keyword" content="html,基本标记"><!-- HTML使用name定义description来设置网页的信息描述 --><meta name="description" content="关于HTML文件的基本标记"><!-- HTML使用name定义generator来设置网页的编辑软件名称 --><meta name="generator" content="eclipse"><!-- HTML使用name定义author来设置网页的作者信息 --><meta name="author" content="刘昕"><!-- HTML使用name定义robots来限制网页的搜索方式 --><!-- All:表示能搜索当前网页及其链接的网页 --><!-- Index:表示能搜索当前网页 --><!-- Nofollow:表示不能搜索当前网页链接的网页 --><!-- Noindex:表示不能搜索当前网页 --><!-- None:表示不能搜索当前网页及其链接的网页 --><meta name="robots" content="Index"><!-- HTML使用http-equiv来定义refresh来设置网页的跳转时间;content中设置时间(秒)与跳转链接 --><meta http-equiv="refresh" content="3;url=https://www.baidu.com"><!-- HTML使用http-equiv来定义expires来设置网页的有效期限;content中设置时间(GMT格式:星期,日   月   年   时   分   秒) --><meta http-equiv="expiresh"    content="Thurs,31 December 2099 23:59:59 GMT"><!-- HTML使用http-equiv来定义cache-control/pragma来设置网页缓存属性;content使用no-cache来设定禁止从缓存中调用 --><meta http-equiv="cache-control" content="no-cache"><meta http-equiv="pragma" content="no-cache"><!-- HTML使用http-equin来定义set-cookie来设置网页删除过期的cookie;content中为网页过期的时间,若网页过期则删除存盘的cookie --><meta http-equiv="set-cookie"    content="Thurs,31 December 2099 23:59:59 GMT"><!-- HTML使用http-equiv来定义windows-target来设置网页的打开方式;content使用_top设置为打开的是一个独立页面 --><!-- 该meta可以防止自己的页面被别人当作一个frame页调用 --><meta http-equiv="windows-target" content="_top"><title>HTML文件的基本标记</title></head><body>    <h1 style="text-align: center;">头部标记</h1>    <p align="center">        base:当前文档的URL全称(基底网址);<br />    </p>    <p align="center">        basefont:设定基准的文字字体、字号和颜色;<br />    </p>    <p align="center">        title:设定显示在浏览器左上方的标题内容;<br />    </p>    <p align="center">        isindex:表明该文档是一个可以用于检索的网关脚本,由服务器自动建立;<br />    </p>    <p align="center">        meta:有关文档本身的元信息,如用于查询的关键字、获取该文档的有效期等;<br />    </p>    <p align="center">        style:设定CSS层叠样式表的内容;<br />    </p>    <p align="center">        link:设定外部文件的连接;<br />    </p>    <p align="center">        script:设定页面中程序脚本的内容;<br />    </p>    <br />    <br />    <br />    <h2 style="text-align: center; color: red;">        <a            href="file:\\\D:\eclipse\workspace\MyPage\HTML_BasicMarkup\ToBeContinue.html">下一页</a>    </h2></body></html>
1 0
原创粉丝点击