我们可以添加< span>在H1标签内? [英] Can we add a <span> inside H1 tag?
本文介绍了我们可以添加< span>在H1标签内?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在H1标签内使用span标签是否正确?
<h1>
<span class="boardit">Portfolio</span>
</h1>
我知道我们可以用这种方式编写它……并且还在我自己的网站中遵循以下语法.
<h1 class="boardit">
<span>Portfolio</span>
</h1>
但是,我只是想知道html的简洁形式.
解决方案
是的.
<!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 -->
%inline;
是:
<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;">
%special;
包括<span>
. /p>
当前 HTML这么说:
内容内容
短语内容
和 定语内容 包括<span>
.
Is it a proper method to use span tag inside H1 tag?
<h1>
<span class="boardit">Portfolio</span>
</h1>
I know we can write it in this way...and am also following the below syntax in my own website..
<h1 class="boardit">
<span>Portfolio</span>
</h1>
However, I Just wanted to know the cleaner form of html..
解决方案
Yes you can.
<!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 -->
And %inline;
is:
<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;">
And %special;
includes <span>
.
The current HTML has this to say:
Content contents
Phrasing content
And Phrasing content includes <span>
.
这篇关于我们可以添加< span>在H1标签内?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文