Content of the <head> tag is in the <body> when I test the site

Asked

Viewed 48 times

0

@EDIT SOLUTION == &#65279 - This error appears between the <body> and gives space difference

I have that code:

<html lang="en">
  <head>
    <link rel="icon" href="<?php echo BASE_URL; ?>assets/img/favicon.ico" type="image/x-icon">
    [...]
  </head>

I put the code to load the favicon inside the <head>, however, when I inspect my site on Chrome, I realized that the head content is in the <body> for some reason, and <head> is empty and this way the favicon does not work

inserir a descrição da imagem aqui

This file is a .php

  • 1

    It would be nice to put the referred php in the post. Suddenly there is something being included BEFORE this your code, like a previous head (in this case the browser will clean the DOM and keep only what you can understand); Compare with the "view source code", and not just the inspector.

  • @Bacco actually the files are . php but the code is all html/css/js

  • @Otaviosouzarocha precisely, if you use one <?php echo BASE_URL; ?> there is no way to be "all HTML", at least something is included. See the colleague’s statement @Sam resolves itself, and look for [Edit] your post for more details, there facilitates a solution.

  • Maybe this can help you: https://answall.com/questions/92639/65279-aparece-esse-erro-entre-o-body-e-d%C3%A1-dif%C3%A7a-de-espa%C3%A7o I’ve had the same problem and solved it this way

  • 1

    @Mr.Andrébaill worked just fine!!!!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.