How to use id attribute to specify a unique id for HTML element and set CSS style

1 Answer

0 votes
<!DOCTYPE html>
<html>
<head>
<style>
    #h1_id {
      background-color: black;
      color: yellow;
      padding: 10px;
      text-align: center;
    } 
</style>
</head>
<body>

<h1 id="h1_id">HTML CSS</h1>

</body>
</html>

 



answered Dec 24, 2018 by avibootz
edited Dec 24, 2018 by avibootz
...