HTML实用功能

例二图:

一、自动跳转页面

<meta http-equiv="refresh" content="时间;url=地址">

例:3秒钟后自动跳转到百度主页

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="refresh" content="3;url=http://www.baidu.com">
<title>无标题文档</title>
</head>

<body>
3秒钟后自动跳转到百度主页
</body>
</html>

二、禁止IE6的图像工具栏
第一种方法:
<img src="demo.gif" gallerying="no">
第二种方法:
<meta http-equiv="imagetoolbar"  content="no">

例: 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"
http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="imagetoolbar"  content="no">
<title>无标题文档</title>
<style type="text/css">
<!--
.style1 {
 font-family: "方正舒体";
 font-size: 36px;
 color: #0000FF;
}
-->
</style>
</head>

<body>
<p class="style1">蜘蛛侠</p>
<p><img src="image/spiderman_0.jpg" width="1024" height="768"></p>
</body>
</html>

三、设置页面关键字和页面描述(搜索引擎)
让搜索引擎服务商找到页面的关键字和页面的描述
<META NAME=”keywords” CONTENT=”页面关键字””>
<META NAME=”description” CONTENT=”页面描述”>
例:
<meta name=roblots content=”noarchive,noindex,nofollow,noimageindex,noimageclick”>

四、添加自定义小图标
准备16×16大小的图标文件
在该页的<head>部分加入以下代码(注意图标与该页的路径关系)
<link rel=”shortcut icon” href=”cunstom_ico”>

五、禁止网页的主题支持
把下面的代码加到网页中的head部分
<meta http-equiv=”msthemecompatible” content=”no”>

六、禁止浏览器对网页进行缓存
在HEAD部分出入如下代码
<meta http-equiv=Pragma content=no-cache>
<meta http-equiv=expires content=0>
<meta http-equiv="cache-control" content="no-store">


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv=Pragma content=no-cache>
<meta http-equiv=expires content=0>
<meta http-equiv="cache-control" content="no-store">
<title>无标题文档</title>
</head>
<body>
禁止浏览器对网页进行缓存
</body>
</html>


 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值