"Element style not allowed as a child of element body in this context"

2

I am learning web development and I am validating my code in the NU HTML checker, but it throws me this error:
Element style not allowed as child of element body in this context. (Suppressing further errors from this subtree.)

My code is as follows:

 <!DOCTYPE html>
 <html lang="es">
  <head>
    <meta charset="utf-8">
    <link rel="shortcut icon" type="image/x-icon" href="img/favicon.ico">
    <title></title>
    <a href="index.html"><img src="img.png" alt="" height="50" width="50"></a>
    <a href="http://jigsaw.w3.org/css-validator?uri=www.google.com"><imgstyle="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"/></a>
    <style type="text/css">
        body {
            background: url("img.jpg");
        }
        div {
            background:url("img.png");
        }
        header {
            color:#fff;
            text-shadow:1px 1px 10px rgba(0,0,0,1);
            font-size: 20px;
        }
        header p {
            text-align: center;
        }
    </style>
  </head>
<body>

And from here the body would begin. I have already validated the CSS but during HTML validation I get that. Can someone tell me what the error is?

    
asked by Ichel Morales 20.12.2017 в 19:49
source

1 answer

3

the elements

<a href="index.html"><img src="img.png" alt="" height="50" width="50"></a>
<a href="http://jigsaw.w3.org/css-validator?uri=www.google.com"><img style="border:0;width:88px;height:31px" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!"/></a>

that you have inside the label <head> , they go in the label <body> , not in the head , and notice that the second label a , inside has an image <img> where you have joined imgstyle , separate them, in the answer I leave it corrected

    
answered by 20.12.2017 / 19:53
source