Home > Article > Web Front-end > How to use html title tag
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.#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:
Tip: If the
html title tag Example
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>php中文网</title> </head> <body> <p>body 元素的内容会显示在浏览器中。</p> <p>title 元素的内容会显示在浏览器的标题栏中。</p> </body> </html>
Output:
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!