我正在标记一系列知识库,如何输入具有一系列步骤和相关屏幕截图的文章.在过去,我总是在段落标签中的列表项中包装文本,但我想知道在这种情况下这是否在语义上是正确的,或者我是否应该使用标题标签(甚至没有).我很想把它标记如下:
<ol class="kbarticle">
<li>
<p>Download the Windows client software <a href="">here</a>.</p>
<a href="#screenshot1"><img src="screen1.jpg" alt="Step 1" /></a>
</li>
<li>
<p>Double click the downloaded file and click "Next" to continue.</p>
<a href="#screenshot2"><img src="screen2.jpg" alt="Step 2" /></a>
</li>
<ol>
Run Code Online (Sandbox Code Playgroud)
另外,如果有任何HTML5元素在语义上更正确,我很想知道.
Dab*_*ler 34
是的,它是有效的.LI定义为
<!ELEMENT LI - O (%flow;)* -- list item -->
Run Code Online (Sandbox Code Playgroud)
并被%flow定义为
<!ENTITY % flow "%block; | %inline;">
Run Code Online (Sandbox Code Playgroud)
并且%block自然包含P,因为它是块级元素.
Dan*_*man -1
Here\xe2\x80\x99s 是您可以使用以下方法对其进行标记的一种方法<figure>:
<ol class="kbarticle">\n <li>\n <figure>\n <a href="#screenshot1"><img src="screen1.jpg" alt="Step 1"></a>\n <figcaption>\n Download the Windows client software <a href="">here</a>.\n </figcaption>\n </figure>\n </li>\n <li>\n <figure>\n <a href="#screenshot2"><img src="screen2.jpg" alt="Step 2"></a>\n <figcaption>\n Double click the downloaded file and click "Next" to continue.\n </figcaption>\n </figure>\n </li>\n</ol>\nRun Code Online (Sandbox Code Playgroud)\n
| 归档时间: |
|
| 查看次数: |
27244 次 |
| 最近记录: |