title property in html code example

Example 1: html title

<head>
  <title>My page title</title>
</head>
<script>
  document.title = "My new title";
</script>

Example 2: html title attribute

/*Title popup*/

<body>
  <p title="Popup here">hover me!</p>
</body>

/*Tab title*/

<head>
  <title>This is the tab title</title>
</head>

Example 3: html title

<head>
<title>This is the title of the Website</title>
</head>

Example 4: html title popup

<img src="money.png" title="Your Bank"> // or...
<div title="Your Bank"></div>

Example 5: html title tag

<title>Website Title</title>

Example 6: change the title in html using

document.title = "My New Page Title";

Tags:

Html Example