情节: 在建立优惠券网站时,我意识到他们可以是不是页面独有的内容,但应该在内部使用<main><article> ..here..</article></main>.
问题:仅仅因为w3schools声明:
元素内的内容应该是文档的唯一内容.它不应包含跨文档重复的任何内容.
但我有内容将在文章内.就像每次例如A coupon can be used by entering its code but a deal can only be activated by going to landing page.
这将在我将发布的每个"优惠券"帖子中重复.所以我现在尝试使用的是.
<main><article><main>Unique content</main>
<aside>A coupon can be used by entering its code but a deal can only be activated by going to landing page</aside></article></main>
Run Code Online (Sandbox Code Playgroud)
但是又一次:
Note: There must not be more than one <main> element in a document.
The <main> element must NOT be a descendent of an <article>, <aside>,
<footer>, <header>, or <nav> element.
Run Code Online (Sandbox Code Playgroud)
那么在内部<main>和/或中格式化UN-UNIQUE内容的最佳方法是什么<article>?
这main应用于对这些元素进行article分组aside。
<main>
<article>
The unique document content.
</article>
<aside>
Related content for that document.
</aside>
</main>
Run Code Online (Sandbox Code Playgroud)