javascripthtmlcssheading

Create a DIV and give it a data-cart-info attribute. Inside the DIV, create a HEADING with mdc-typography--headline4" as its CSS class


Create a DIV and give it a data-cart-info attribute. Inside the DIV, create a HEADING with mdc-typography--headline4" as its CSS class.

My Solution:

<div data-cart-info="mdc-typography--headline4">
   <h1>Heading</h1>
</div>

Please is my solution correct?

  </head>
  <body>
    <div data-cart-info="mdc-typography--headline4"><h1>Heading</h1></div>
    <script>
      const supportedCards = {
        visa : 'visa', mastercard : 'mastercard'
      };
     </script>

I am building a PayCard(Credit Card Validator)


Solution

  • this is my code

    <div data-cart-info>
        <header class="mdc-typography--headline4"></header>
    </div>