html <p> 样式代码无效

html <p> style code not working

正在尝试编写一个简单的网页并正在学习 html。我想知道为什么我的

的简单样式代码没有任何变化。下面就是了。

<!DOCTYPE html>
<html>
<head>
<!-- SE copied from old site   -->

<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/
font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="css/topnav-index.css">
<!-- abv css I created myself, just the TopNav bar -->

<style>
<!-- this is for page wide style  -->
<!-- define all paragraph font for main pg   -->
p {
color: red;
text-align: left;
font-family: palatino;
font-size: 16pt;
background-color: #909090;
<!-- margin: 4 prop is top, R, bott, L -->
margin-left: 32px;
margin-top: 30px;
<!-- margin: 20,25,35,40;  -->
padding-left: 12%;
padding-top: 10%;
    } 

</style>
</head>

<body>

<div class="topnav" id="myTopnav">
  <a href="#home" class="active">Home</a>
  <a href="#news">News</a>
  <a href="#contact">Contact</a>
  <a href="#about">About</a>
  <a href="javascript:void(0);" class="icon" onclick="myFunction()">
    <i class="fa fa-bars"></i>
  </a>
</div>

<div style="padding-left:16px">
  <h2>Title</h2>
  <p>Responsive Topnav Example</p>
 </div>

<!--  main content -->
<p>B This site explores the connection between XXX and the
 historical events...</p>

现在顶部导航栏可以使用了,但是 none p 文本的格式设置似乎无能为力。它在 header 中,我理解 p,在 greater/less 比标志中,作为它自己的特殊容器...

在 css 你应该使用 /* */ 作为注释而不是 <!--- -->

p {
    color: red;
    text-align: left;
    font-family: palatino;
    font-size: 16pt;
    background-color: #909090;
    /* margin: 4 prop is top, R, bott, L */
    margin-left: 32px;
    margin-top: 30px;
    /*margin: 20,25,35,40;  */
    padding-left: 12%;
    padding-top: 10%;
}