HTML头标签和框架标签

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/qq_38230811/article/details/83097736

HTML头标签

根据 HTML 标准,仅有几个标签在 HTML 的头部分是合法的。它们是:<base>, <link>, <meta>, <title>, <style> <script>

 

<title> 元素

<title> 标签定义了不同文档的标题,是HTML/XHTML 文档中必须的元素。 [1] 

<base> 元素

<base> 标签描述了基本的链接地址/链接目标,该标签作为HTML文档中所有的链接标签的默认链接

例子:

<base target=”_blank”/>

<meta> 元素

<meta> 元素设置页面的一些相关内容

例子:

<meta name=”keywords”   content=”HTML,没事来看看博主”/>

<meta  http-equiv=”refresh”  content=”3”;url=”01.hetml” />

 

<link> 元素

<link> 元素引人外部文件

 

框架标签

<frameset> 元素可定义一个框架集。它被用来组织多个窗口(框架)。每个框架存有独立的文档。在其最简单的应用中,frameset 元素仅仅会规定在框架集中存在多少列或多少行。必须使用 cols rows 属性。

 

使用了这个标签不能写body标签

<html>

<frameset cols="25%,50%,25%">

  <frame src="/example/html/frame_a.html">
  <frame src="/example/html/frame_b.html">
  <frame src="/example/html/frame_c.html">

</frameset>

</html>

效果

<html>

<frameset rows="50%,50%">

<frame src="/example/html/frame_a.html">

<frameset cols="25%,75%">
<frame src="/example/html/frame_b.html">
<frame src="/example/html/frame_c.html">
</frameset>

</frameset>

</html>

效果

猜你喜欢

转载自blog.csdn.net/qq_38230811/article/details/83097736