如何在 HTML 中添加文档标题?


使用 <title> 标签添加文档标题。HTML <title> 标签用于指示 HTML 文档的标题。正文标题放置在 <head> 和 </head> 标签之间。

示例

你可以尝试运行以下代码来了解如何在 HTML 中添加文档标题 −

<!DOCTYPE html>
<html>
   <head>
      <title>Title comes here</title>
   </head>
   <body>
      <p>title tag is used for indicating the title of the HTML document. HTML document
         title is visible via browser’s title bar.</p>
   </body>
</html>

更新于: 02-3-2020

243 人阅读

开启你的 职业

完成课程获得认证

开始
Advertisement
© . All rights reserved.