¿Cómo agregar el logotipo del icono en la barra de título usando HTML?

La mayoría de los sitios web agregan un icono o un logotipo de imagen en la barra de título. El logotipo del icono también se denomina favicon. Agregar favicons también se considera bueno para el SEO de los sitios web. El favicon es la combinación del icono favorito.

El atributo de enlace se utiliza para agregar el favicon.

Sintaxis:

<link rel="icon" href="icon_path" type="image/icon type">

Ejemplo:

<!-- HTML code to add icon in the title bar -->
<!DOCTYPE html>
<html>
    <head>
        <meta charset = "utf-8" />
          
        <title>
            GeeksforGeeks icon
        </title>
          
        <!-- add icon link -->
        <link rel = "icon" href = 
"https://media.geeksforgeeks.org/wp-content/cdn-uploads/gfg_200X200.png" 
        type = "image/x-icon">
          
    </head>
      
    <body>
        <h1 style = "color:green;">
            GeeksforGeeks
        </h1>
          
        <p>
            GeeksforGeeks icon added in the title bar
        </p>
    </body>
</html>                    

Producción:

Publicación traducida automáticamente

Artículo escrito por NAYONIKA y traducido por Barcelona Geeks. The original can be accessed here. Licence: CCBY-SA

Deja una respuesta

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *