私のタイトルが言うように、CSS が label タグ以外のすべてで機能する理由がわかりません。
ファイルレジスタのコードは次のとおりです。
<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="style.css" />
    <center> <b> Registration Page </b> </center> 
  </head>
  <br>
  <body>
    <img src = "website_demo_pic_1.jpg" />
    <ul class = "SiteMap">
      <li> <a href = "index.html" >Home Page</a>
      <br>
      <li><a href = "register.html" >Register</a>
      <br>
      <li><a href = "login.html" >Log In</a>
      <br>
    </ul>
    <form id = "Form1" action = "submit.php" method = "post">
      <p class="whitetext"><label for = "username">Username :</label>
      <input type = "text" name = "Username" id="username"></p>
      <p class="whitetext"><label for = "password">Password  :</label>
      <input type = "password" name = "Password" id="password"></p>
    </form>
  </body>
</html> 
ログイン用のコードは次のとおりです。
<!DOCTYPE html>
<html>
  <head> 
    <link rel="stylesheet" type="text/css" href="style.css" />
    <center> <b> Log In  Page </b> </center> 
  </head>
  <br>
  <body>
    <img src = "website_demo_pic_1.jpg" />
    <ul class = "SiteMap">
      <li> <a href = "index.html" >Home Page</a>
      <br>
      <li><a href = "register.html" >Register</a>
      <br>
      <li><a href = "login.html" >Log In</a>
      <br>
    </ul>
    <form id = "Form2" action = "submit.php" method = "post">
      <label for = "username2">Username :</label>
      <input type = "text" name = "Username" id="username2">
      <br>
      <label for = "password2">Password  :</label>
      <input type = "password" name = "Password" id="password2">
      <br>
    </form> 
  </body>
</html>
ここに私のCSSファイルがあります:
  img
  {
    width: 100%;
  }
  body
  {
    background-color: black;
  }
  label
  {
    width: 4em;
    float: left;
    text-align: right;
    margin-right: 0.5em;
    display: block
  }
  p.whitetext
  {
    color: white;
  } 
  ul.SiteMap
  {
    float: left;
  }
私が知る限り、コードは正しいのですが、テキスト ボックスが整列しません。これは、ラベルに奇妙なことが起こっていることを意味します。