The empty space under the <body> tag and script tag and link tag goes under the body tag from the header

alt text

alt text

Hi guys, I wrote a php application using php + smarty.

When I look at the source code in firebug, I find that the link tag and the script tag fall under the body tag . but I have to be under my head .

and there is a space below the body tag .

and there is blank space on my top of my web page.

so what's the problem?

+3
source share
4 answers

<head> , <link>. , , , <body>.

- - HTML4: <head> <body> start-tag . <html><head><title>x</title>Hello! HTML-. XHTML, , , " " .

, <link> ( , ). <body>, , .

, , , U + 00A0.   , , - U + 3000  , . , " , U + 0020 , " <body>.

+6

, -, , UTF-8 ( ). , Notepad ++ Vim, UTF-8 .

+1

Add the following CSS:

html, body
{
    padding: 0px;
    margin: 0px;
}
0
source

Send your HTML code through the validator ( http://validator.w3.org/ ) - it will tell you what your error is (missing closing tag or something else).

0
source

Source: https://habr.com/ru/post/1767675/


All Articles