The title tag (which is a part of HTML) is defined in the head section in the following way.
<head> <title> Page Title </title> </head>
Title tags are used to give a heading to pages. For example, if it is the home page, the title tag can contain the blog name. If it is a post page, then it can contain the post title and the blog name.
Be default, the titles of blog posts list the blog name followed by the blog post title. Having it the other way would be advantageous.
Importance of proper title tags
The title tag is displayed in the browser tab controller. For example if the title tag is
<title>A light hearted talk</title>
then the browser window (Chrome) will look like the following.
If a reader of your blog has opened many pages in a single browser window and he wants to navigate to one particular post whose post name he remembers, then he cannot do it easily because all the titles start with the blog name and if the blog name is big, then all the tab will show only the blog name and not the post name. This scenario is illustrated in the screenshot below.
The title tag is also displayed in Google Search results. Having the post name before your blog name might increase the click through rate.
How to customise title tags
Go to Template -> Edit HTML
In the HTML template. It will be present in the first few lines (to be more precise, the 11th line if the template has never been edited)
The above line says that the title to be displayed should be the pageTitle which by default lists the blog name followed by the post name.
Replace the above code with the following and click Save Templae.
<b:if cond='data:blog.pageName == ""'> <title><data:blog.title/></title> <b:else/> <title><data:blog.pageName/>: <data:blog.title/></title> </b:if>
In the above code, we are saying that if the pageName is empty (which happens only on the home page), then use the blog name as the title tag. Otherwise, use the page name followed by a colon and the blog name as the title tag. The page name will be the blog post name on post pages, and the month / year on archive pages.
Leave a Reply