HTML title tag and element

1. HTML title element sets a title for an HTML document.

2. An appropriate title helps users as well as search engines to understand the purpose of the page.

3. Text enclosed by the title tags are displayed on the upper right corner of the browser window, when the page is opened.


<title>Title of the page</title>


HTML title element is part of the global structure of an HTML page.

Whether both start and end tags are required

Both start and end tags are required.

Can contain

HTML title element can not contain any other element.

Can reside within

HTML title element can reside within head element only.


Attributes specific to this element



Does not support.

language information and text direction

lang, dir.


Does not support.


Does not support.


HTML html element does not support event attributes.

Example of using HTML title element

Bellow is a simple HTML page which is containing a title.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<head profile="https://www.w3resource.com/profiles.html" >
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>html title tag example</title>
<p>We are learning HTML title element. </p>


html title tag element

View this example in a separate browser window

HTML title tag example.

Pictorial presentation


Previous: HTML head tag and element
Next: HTML meta tag and element

Test your Programming skills with w3resource's quiz.