Element style not allowed as child of element body in this context. (Suppressing further errors from this subtree.)

<!DOCTYPE html>
<html>
  <head>
      <meta charset="UTF-8" />
      <title>assignment 4</title>
      <h1>Assignment4- CSS basics</h1>


     <style>
      .special {
        text-align:justify;
        text-indent:10px;
      }
    </style>

Its telling me that the element style is not allowed, please help


solution

The h1 does not belong in the head section. Instead, it should be in the body.

It should look something like:

<!DOCTYPE html>
<html>
 <head>
    <meta charset="UTF-8" />
    <title>assignment 4</title>
    <style>
       .special {
           text-align:justify;
           text-indent:10px;
       }
    </style>
 </head>
 <body>
    <h1>Assignment4- CSS basics</h1>
 </body>
</html>