Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/73.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 在标记小说时,我应该使用多个p元素还是一个包含br元素的p元素?_Html - Fatal编程技术网

Html 在标记小说时,我应该使用多个p元素还是一个包含br元素的p元素?

Html 在标记小说时,我应该使用多个p元素还是一个包含br元素的p元素?,html,Html,我想知道我所做的是否是“正确的方法”,即使在编程中(虽然HTML不是真正的编程语言),有几种方法可以解决问题 我目前正在应用我现有的HTML知识,制作一个用户可以在其中阅读小说/书籍的网站。我想知道我是应该为每个段落使用多个p元素,还是一个段落使用多个br元素 我目前正在使用多个p元素。所以我怀疑这是否正确。有时书中有些段落只在网上出现,通常是在与角色对话时,所以我的html文件中有很多p元素 <p> Look, I didn't want to be a half-bloo

我想知道我所做的是否是“正确的方法”,即使在编程中(虽然HTML不是真正的编程语言),有几种方法可以解决问题

我目前正在应用我现有的HTML知识,制作一个用户可以在其中阅读小说/书籍的网站。我想知道我是应该为每个段落使用多个p元素,还是一个段落使用多个br元素

我目前正在使用多个p元素。所以我怀疑这是否正确。有时书中有些段落只在网上出现,通常是在与角色对话时,所以我的html文件中有很多p元素

<p>
    Look, I didn't want to be a half-blood.    
</p>
<p>
    If you're reading this because you think you might be one, my advice 
is: close this book right now. Believe whatever lie your mom or dad told you about your birth, and try to lead a normal life.
</p>
<p>
    Being a half-blood is dangerous. It's scary. Most of the time, it gets you killed in paiful, nasty ways.
</p>
<p>
    If you're a normal kid, reading this because you think it's fiction, great. Read on. I envy you for being able to believe that none of this ever happened.
</p>
<p>
    But if you recognize yourself in thses pages&mdash;if you feel something stirring inside&mdash;stop reading immediately. You might be one of us. And once you know that, it's only a matter of time before <em>they</em> sense it too, and they'll come for you.
</p>
<p>
    Don't say I didn't warn you.
</p>
<hr>
<p>
    My name is Percy Jackson.
</p>
<p>
    I'm twelve years old. Until a few months ago, I was a boarding student at Yancy Academy, a private school for troubled kids in upstate New York.
</p>
<p>
    Am I a troubled kid?
</p>
<p>
    Yeah. You could say that.
</p>
<p>
    I could start at any point in my short miserable life to prove it, but things really started going bad last May, when our sixth-grade class took a field trip to Manhattan&mdash;twenty-eight mental-case kids and two teachers on a yellow school bus, heading to the Metropolitan Museum of Art to look at ancient Greek and Roman stuff.
</p>
<p>
    I know&mdash;it sounds like torture. Most Yancy field trips were.
</p>
<p>
    But Mr. Brunner, our Latin teacher, was leading this trip, so I had hopes
</p>

听着,我不想成为混血儿。

如果你读这篇文章是因为你认为你可能是其中之一,我的建议是 现在就把这本书合上。相信你妈妈或爸爸告诉你的关于你出生的任何谎言,试着过正常的生活。

混血儿是危险的。太可怕了。大多数时候,它会让你以一种可怕的方式死去。

如果你是一个正常的孩子,读这篇文章是因为你认为它是虚构的,太好了。继续读下去。我羡慕你能相信这一切都没有发生过。

但是如果你在这些页面中认出了自己&mdash;如果你觉得里面有东西在动&mdash;立即停止阅读。你可能是我们中的一员。一旦你知道了这一点,他们也会感觉到这一点只是时间问题,他们会来找你的。

不要说我没有警告你。


我叫珀西·杰克逊。

我十二岁了。直到几个月前,我还是纽约州北部一所为问题儿童开设的私立学校Yancy Academy的寄宿生。

我是个麻烦的孩子吗?

是 啊你可以这么说。

为了证明这一点,我可以在我短暂而悲惨的一生中的任何时候开始,但去年5月,当我们六年级的班级到曼哈顿进行实地考察时,情况真的开始恶化;28名患有精神病的孩子和两名教师坐在一辆黄色校车上,前往大都会艺术博物馆参观古希腊和古罗马的东西。

我知道&mdash;听起来像是折磨。Yancy的大部分实地考察都很成功。

但我们的拉丁语老师布伦纳先生是这次旅行的带头人,所以我有希望


所以结果看起来和书中的一样。但我唯一想知道的是,是否最好只使用一个p元素,然后使用不同的br元素。

标签用于段落,因此如果它们真的是段落(并不总是很容易说),它们都应该用自己的
标签包装。如果你知道我的意思的话,我喜欢把

想得更像是shift+enter。。。如果您需要我的建议,请坚持使用您当前的方法,并且只有在非常明显的情况下才使用

这一切都取决于您希望给用户的外观和感觉。尽管我建议继续采用同样的方法。这将使您更容易管理代码和编辑内容

我会坚持使用你的解决方案,而不是使用“br”,它更干净,更容易阅读!然后,我会使用css类来区分不同类型的段落(对话、引号…)