The HTML document consists of two major segments; the header, and the body. All visible objects on a web page are defined in the body of the HTML document, while all the document definitions are done in the header. In this tutorial we will learn how to set HTML page title and also the important constraints regarding HTML header title.
Step # 1 – Head
To assign HTML page a title we will use the <title> element of the HTML header. The <title> element takes a word or sentence that we need between its opening and closing tags. This value labels the page from there on.
Step # 2 – Uses and constraints
The word or sentence set as title is displayed in the browser toolbar or as the name of the page when it is bookmarked. The value of the <title> element is also used as the name of your page when your website shows up in search results. In HTML header, the title element can be used only once, inferring that there can only be one title of a web page.