tag, in the title tag."/>
tag, in the title tag.">

Home  >  Article  >  Web Front-end  >  How to use html title tag

How to use html title tag

青灯夜游
青灯夜游Original
2019-05-26 17:57:085263browse

The title tag in html is used to define the title of the web page, which is displayed at the top of the browser. In addition, the title tag is placed within the

tag, in the title tag.

How to use html title tag

#html How to use the title tag?

html The title tag defines the title of the document and is located within

.

Note: Browsers use titles in a special way, and usually place them on the title bar or status bar of the browser window. Likewise, when a document is added to a user's links list or favorites or bookmarks list, the title becomes the default name for the link to the document.

Syntax

<title></title>

The title element is required in all HTML documents. Its role:

● Define the title in the browser toolbar

● Provide the title when the page is added to favorites

● Display in search engine results Page title

● Title tag placement position

Note:

tag is the only thing required to be included in the tag. There cannot be more than one <title> element in an HTML document. <p><strong>Tip: </strong>If the </p> <title> tag is omitted, the document is invalid as HTML. <p><strong>html title tag Example</strong></p><pre class="brush:html;toolbar:false"><!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>php中文网</title> </head> <body> <p>body 元素的内容会显示在浏览器中。</p> <p>title 元素的内容会显示在浏览器的标题栏中。</p> </body> </html></pre><p>Output:</p> <p><img src="//m.sbmmt.com/img/upload/image/128/673/690/1558864504329290.jpg" title="1558864504329290.jpg" alt="How to use html title tag"></p>

The above is the detailed content of How to use html title tag. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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
Previous article:How to use html input tagNext article:How to use html input tag