Whats wrong with my html code?


#1


When I run this code the, h2 below the div wont make the text bigger, why?


<!DOCTYPE html> 
<html>
 <head>
  <meta name="viewport" content="width=device-width, initial-scale=1.0">

<!--The style of the webpage-->
<style>
div.Panel {
    background-color: black;
    color: white;
    margin: 20px 0 20px 0;
    padding: 30px;
} 
</style>

<body>
<div class="Panel"
<h2>Work in progress</h2>
 <p> Hello and welcome to the website! its currently under construction 
     as im learning how to make a good webpage. Im very new to this and
      has a lot to learn! Hopefully something good turns out! 
      <p> Your welcome back at any time, thanks. </p>
  </div>
  
  </head>
  </body>
</html>


#2

Didn't close this properly.

<head> shouldn't be overlapping with body. Think of this as a human body. You have your head at the top and then neck, and then body. It's not like you have a part of your head, your body, your chin at your legs, and then feet. Makes no structural sense.


Caught something else:

Didn't close this properly. Missing </p>.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.