how to add title logo in html code example

Example 1: how to add a title picture in html

<link rel = "icon" type = "image/png" href = "name-of-image.png">

Example 2: how to change the logo in the title of a webpage

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- This is how you add your image below --> 
  	<link rel = "icon" type = "image/png" href = "name-of-image.png">
</head>
<body>
  
</body>
</html>

Example 3: how to add image in title bar

<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon">

Example 4: change the title in html using

document.title = "My New Page Title";