Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/70.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 如何从无序列表中删除缩进,但不使用CSS?_Html - Fatal编程技术网

Html 如何从无序列表中删除缩进,但不使用CSS?

Html 如何从无序列表中删除缩进,但不使用CSS?,html,Html,代码如下——我想在几个地方进行更改,但不是全面更改 <ul> <li> <div style="margin: 0px" > 58% of the population is age 19 or younger (an estimated 520,000 children), compared with 36% of the broader population. </div> </li> &l

代码如下——我想在几个地方进行更改,但不是全面更改

<ul>
  <li>
    <div style="margin: 0px" >
      58% of the population is age 19 or younger (an estimated 520,000 children), compared with 36% of the broader population. 
    </div>
  </li>
  <li>
    <div style="margin: 0px">
      3% are age 65 or older, compared with 11% of the broader population. 
    </div>
  </li>
</ul>
  • 58%的人口年龄在19岁或19岁以下(估计有52万名儿童),而在更广泛的人口中这一比例为36%。
  • 3%的人年龄在65岁或65岁以上,而在更广泛的人群中这一比例为11%。

您选择的元素带有默认样式,必须用CSS覆盖。唯一的其他选择是使用不同的元素。当你说“我想在几个地方进行更改”时,你能更具体一些吗?是每三件吗?或者每第二项,但仅在前6项中?如果你能说得更具体一些,那真的会有帮助-谢谢!只需向要删除缩进的元素添加一个
class
,并像
一样设置css。您的_class{margin:0;padding:0}
您应该使用一个类,当您可以使用一个类来简化它时,无需复制css源代码。另外,您是否希望在
li
标记上使用此样式,而不是在
div
标记上使用此样式?我希望页边空白在
ul
li
标签上,而不是
div
s。