Home > Web Front-end > H5 Tutorial > body text

HTML5 对各个标签的定义与规定:title

WBOY
Release: 2016-05-17 09:10:02
Original
1686 people have browsed it

<span style="font-size: 12pt; color: rgb(61, 61, 61);" lang="EN-US"> <script language="javascript"></script></span>
<span style="font-size:12.0pt;color:#3D3D3D;mso-ansi-language: EN-US;mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA" lang="EN-US">document.title = 'htmlv.cn';</span>
<span style="font-size:12.0pt;color:#3D3D3D;mso-ansi-language: EN-US;mso-fareast-language:ZH-CN;mso-bidi-language:</script></span>写在head中,且只许出现一次。

内容类型为文本形式。

interface HTMLTitleElement : HTMLElement {
           attribute DOMString text;
};

title的标签中的内容用来表达文档的标题或名称。
在其他环境中也用title标签分别不同的html文档,例如书签中等。
调用或设置title的方法
interface HTMLTitleElement : HTMLElement {
           attribute DOMString text;
};

title的标签中的内容用来表达文档的标题或名称。
在其他环境中也用title标签分别不同的html文档,例如书签中等。
调用或设置title的方法

代码: 全选 运行
title . text [ = value ]

调用title的方法:document.title
所以上例中的代码实际应用中可以写成

……



……

<span style="FONT-SIZE: 12pt; COLOR: #3d3d3d; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA" lang="EN-US"> <script language="javascript"></script></span>
<span style="font-size:12.0pt;color:#3D3D3D;mso-ansi-language: EN-US;mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA" lang="EN-US">document.title = 'htmlv.cn';</span>
<span style="font-size:12.0pt;color:#3D3D3D;mso-ansi-language: EN-US;mso-fareast-language:ZH-CN;mso-bidi-language:AR-SA" lang> </span><span style="FONT-SIZE: 12pt; COLOR: #3d3d3d; mso-ansi-language: EN-US; mso-fareast-language: ZH-CN; mso-bidi-language: AR-SA" lang="EN-US"></span>

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template