Heim  >  Artikel  >  Web-Frontend  >  Html学习之html的文件基本标记(1)_html/css_WEB-ITnose

Html学习之html的文件基本标记(1)_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 11:41:03948Durchsuche

  学习了html基本的结构,现在小编进入了html文件基本标记的学习!

  html的头部标记

  常用的标记有:

  (1):当前基址

  (2):设定基准的文字字体、字号和颜色

  (3):表明该文档是一个可用于检索的网关脚本,由服务器自动建立

  (4):有关文档本身的元信息

  (5)

  (6)设定外部文件的链接

  (7)<script>设定页面中程序脚本的内容</script>

以下开始一一介绍这些常用的标签

1.元信息标记

meta是一个单元素!不需要设置结束标记,它的属性有两种:name和http-equiv,name是用于描述网页,以便于搜索引擎查找和分类

1.1 设置页面关键字

ex:

以上这句代码的意思是网页的关键字属性名称是keyname,content是关键字的内容

1.2 设置页面描述

ex:

以上这句的意思是页面的描述,也就是页面具体的内容

1.3 设置编辑工具

ex:

1.4 设定作者信息

ex:

1.5 限制搜索方式

ex:

1.6 设置网页文字及语言

ex1:

ex2:

1.7 设置网页的定时跳转

ex:

ps:时间是以秒为单位的

1.8 设定有效期限

ex:

1.9 禁止从缓存中调用

ex:

2.0 删除过期的cookie

ex:

2.1 强制打开新窗口

ex:

2.2 设置网页的过渡效果

ex:

 1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2 <html xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4  5 <meta name="description" content="关于html使用" /> 6 <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> 7 <meta name="generator" content="Adobe Dw"/> 8 <meta name="keywords" content="http"/> 9 <meta name="author" content="Mr li"/>10 <!-- 表示能搜索当前网页-->11 <meta name="robots" content="index"/>12 <title>我的meta</title>13 <meta http-equiv="content-type"content="text/html";charset="utf-8"/>14 <!--定时跳转-->15 <meta http-equiv="refresh" content="2;url=http://www.baidu.com">16 </head>17 18 <body>19 <div id="first">20 将要跳转21 </div>22 </body>23 </html>

这是小编自己写的一个小例子!各位大神可检验下!

 

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn