set title of html page code example

Example 1: 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 2: how to add a title in html

<!DOCKTYPE html>
<html>
  <head>
    <title>This Is A Website Title...</title>
  </head>
  <body>
    <p>How to add a Title to a HTML website...</p>
  </body>
</html>

Example 3: change the title in html using

document.title = "My New Page Title";

Example 4: html title attribute

<head>
  <title>This is your webpage title</title>
</head>

Tags:

Css Example