2014-05-12 10 views
0

(请告诉我,如果我要重视这个问题到另一个网站,因为它的理论。)对于HTML5中的“只是文本”使用p标记是否有很好的理由?

考虑通常

<article class="faux-news"> 
    <h1>The zombies have arisen</h1> 
    <p>Join our reporter as he unravels today's events from Reseda's Northridge Mall this morning.</p> 
    <h2>Oh, the humanity!</h2> 
    <p>Droves of humanity (living and undead) piled up on either side of the glass doors, one drove from the inside trying to get their filthy hands on some brainz and the other drove trying to get their meticulously manicured hands on the new iBerry. To the living, it was just another crowd to fight for their long since pre-loved tech gadget.</p> 
    <h2>Un-undead Victorious</h2> 
    <p>So strong were their desire for the mythical iBerry 6, so firm their resolve, that the living easily overcame the re-living. The stampede was too much for the undead, who were simply left for - dead.</p> 
    <p>And so the living were spared infection by Zombie Rot on this day. But naturally, rumors are already in circulation about, primarily, the iBerry 7, and secondarily, iBerry 6 fans being zombies to begin with and how there's this big conspiracy bankrolled by the liberals and ancient aliens from Alpha Beta Six.</p> 
</article> 

<article class="faux-news"> 
    <h1>The zombies have arisen</h1> 
    Join our reporter as he unravels today's events from Reseda's Northridge Mall this morning. 
    <h2>Oh, the humanity!</h2> 
    Droves of humanity (living and undead) piled up on either side of the glass doors, one drove from the inside trying to get their filthy hands on some brainz and the other drove trying to get their meticulously manicured hands on the new iBerry. To the living, it was just another crowd to fight for their long since pre-loved tech gadget. 
    <h2>Un-undead Victorious</h2> 
    So strong were their desire for the mythical iBerry 6, so firm their resolve, that the living easily overcame the re-living. The stampede was too much for the undead, who were simply left for - dead.<br> 
    And so the living were spared infection by Zombie Rot on this day. But naturally, rumors are already in circulation about, primarily, the iBerry 7, and secondarily, iBerry 6 fans being zombies to begin with and how there's this big conspiracy bankrolled by the liberals and ancient aliens from Alpha Beta Six. 
</article> 

,如果有的话,是的搜索引擎优化惩罚不是将主要文本分成​​几段(而不是一些标签作为分隔符)?

<br>可能有造型问题,但它可以替换为<span class="br">或任何样式标签。

可能存在针对单个段落的样式问题,但这也可以解决 - f.ex.为<p class="i-am-individual">只为那些。

是否还有其他问题需要考虑 - 例如与跨浏览器渲染相关的问题?我没有看到它,但你可能会看到我没有看到的。

总之什么是跳过那个讨厌的段落文本定义,可能会导致工作的实际金额来解决未闭合<p>标签与“富文本编辑器的用户使用”的危险?

+1

OK..try并选择刚刚文字的每个项目,并添加底利润的能力,这个苏答案。有一个! –

+0

在这个问题中,我解决了造型问题,解释了如何制作一个工作示例。你不认为我会有吗? http://dl.dropboxusercontent.com/s/yq39772wyflra5r/NoP.png –

回答

1

的“危害”是,你可以有一切“只是文字”不一致的造型,因为你在继承造型依托地方出现“只是文字”,它可能出现在封闭比<article>其他HTML标签。

但是,在您的特殊情况下,这可能完全可以接受。 另外,通过消除无关标记并从必须完成所有必要工作中找到并附上<p>标签中的“正文”,您将获得一点点收获。

个人?我喜欢有包装

文本再有就是,如果你要使用jQuery to wrap all unwrapped text in p tags

相关问题