在H1标签内使用span标签是否合适?
<h1>
<span class="boardit">Portfolio</span>
</h1>Run Code Online (Sandbox Code Playgroud)
我知道我们可以用这种方式编写它...并且我也在我自己的网站中遵循以下语法.
<h1 class="boardit">
<span>Portfolio</span>
</h1>Run Code Online (Sandbox Code Playgroud)
但是,我只是想知道更清晰的HTML形式..
mu *_*ort 176
是的你可以.
<!ENTITY % heading "H1|H2|H3|H4|H5|H6">
<!--
There are six levels of headings from H1 (the most important)
to H6 (the least important).
-->
<!ELEMENT (%heading;) - - (%inline;)* -- heading -->
Run Code Online (Sandbox Code Playgroud)
并且%inline;是:
<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;">
Run Code Online (Sandbox Code Playgroud)
并%special;包括<span>.
目前的HTML有这样的说法:
内容内容
短语内容
和短语内容包括<span>.
jzm*_*jzm 28
是的你可以.它可以用来格式化h1块的一部分:
<h1>Page <span class="highlight">Title</span></h1>
Run Code Online (Sandbox Code Playgroud)
如果样式适用于整个h1块,我这样做:
<h1 class="highlight">Page Title</h1>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
84557 次 |
| 最近记录: |