HTML Tags – Title Tag


What is the HTML <title> tag ?

HTML <title> tag is used to represent the title to an HTML document.

HTML <title> tag title is usually displayed in the browser’s title bar (at the top).

HTML <title> title is also displayed in browser bookmarks and search results.

HTML <title> tag title must be in text-only format.

HTML <title> tag title is placed between the <head> and the </head> tags.

How HTML <title> tag works ?

HTML <title> tag is used to indicate the title of the HTML document.

HTML <title> tag defines a title in the browser toolbar

HTML <title> tag provides a title for the page when it is added to favourites

HTML <title> tag displays a title for the page in search-engine results

Note: We can NOT have more than one <title> element in an HTML document.

HTML <title> tag title contents is essential for search engine optimization (SEO).

HTML page title is used by search engine algorithms to decide the order when listing pages in search results.

How to implement HTML <title> tag effectively ?


1. Always use longer, descriptive title (avoid one or two-word titles)

2. Search engines will display about 50-60 characters of the title, so try not to have titles longer than that.

3. Do not use just a list of words as the title (this may reduce the page’s position in search results)


4. Please try to make the title as accurate and meaningful as possible!

Why is the HTML <title> tag used ?

HTML <title> tag is used for declaring the title, or name, of the HTML document.

HTML <title> tag title name/content is essential for Search Engine Optimization (SEO).

HTML beginners tutorial !!!

Click to Learn More about – HTML Tutorial for beginners

Syntax :

<title> Title name </title>

Example :

<!DOCTYPE html>
<html>
        <head>
                <title>Title Content</title>
        </head>
        <body>
                <h2>Title Tag - Look at the browser for HTML "Title Content"</h2>
                <h1>Welcome to CSTechbook</h1>
        </body>
</html>

Output :

<title> Tag Attributes

HTML <title> tag does not support any specific attributes.

Global Attributes

HTML <title> tag support following global attributes.

SnoAttributesValueDescription
1idunique_nameDeclared unique id for an element.
2classclass_nameDeclared one or more classnames for an element.
3stylestylesCSS inline styles specify an element.
4titletitleSpecify extra details of element contain, this will display as a “tooltip” for an elements.

Browser Compatibility

SnoBrowserSupport
1ChromeYes
2FirefoxYes
3EdgeYes
4OperaYes
5SafariYes
6Internet ExplorerYes