Where is the error in this code? Why does it have no effect when the browser is opened?

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
        <style type="text/css">
          -sharp1{
              width: 600px;
              height: 300px;
              background-color: greenyellow;
              margin:20px auto;
          }
        </style>
    </head>
    <body>
       <div id="1">
           
       </div>
    </body>
</html>
Mar.24,2021

you cannot do id with a string that begins with a number


you can open the right mouse button-> check, or F12, open the developer tool to check for yourself

Menu