<div id = "topParagraph"><p id = "topParagraph">text </p>
<p id = "paragraph2"> stuff</p></div>
虽然<p>
用于缩进。这是一个fiddle到。
最佳答案
您必须指定 text-indent
样式。 p
不会自动缩进,它只是创建一个新段落。尝试:
#topParagraph {
text-indent: 10px;
}
也显示在这个 fiddle 中:http://jsfiddle.net/7zybK/2/
关于html - 为什么这不缩进 HTML?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5877352/