[英]can an <small> be inside a <p> tag?
I have to do a semantic webpage from a pdf.我必须从 pdf 做一个语义网页。 Everything is going fine (not at all), but I have a footnote that doesn't fit in a resposive line-height.
一切都很好(一点也不),但我有一个脚注不适合响应行高。 I want to put it inside ap tag, which works fine, but I don't know if that is good.
我想把它放在 ap 标签中,这很好用,但我不知道这是否好。
here's the code:这是代码:
.text {
padding-left: 8.5vw;
padding-right: 8.5vw;
padding-bottom: 10vw;
}
.text-column {
padding-top: 10vw;
column-count: 2;
column-gap: 4vw;
}
.text p {
color: #333;
margin-bottom: 2.7vw;
line-height: 3vw;
text-align: justify;
text-indent: 3vw;
font-size: 2.12vw;
}
.footnote hr {
background-color: #000;
width: 33%;
height: 0.2vw;
margin-top: 4vw;
margin-bottom: 1vw;
border-color: #000;
}
.footnote {
font-size: 1.36vw !important;
text-align: justify !important;
line-height: 1em !important;
}
<article class="text text-column">
...
<small class="footnote">
<hr>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Eligendi tempore nostrum laboriosam laborum sed nulla
quae libero distinctio consequuntur. Ut sint molestiae, placeat voluptatibus vitae repudiandae architecto nemo
et in?
</small>
</article>
Yes .是的。 In fact,the MDN page for
<small>
itself showcases a <small>
tag nested inside a <p>
tag as its example:事实上,
<small>
本身的 MDN 页面展示了一个嵌套在<p>
标签中的<small>
<p>
标签作为它的例子:
<p>This is the first sentence. <small>This whole sentence is in small letters.</small> </p>
<p>
is a flow content element, and <small>
is a phrasing content element. <p>
是流内容元素, <small>
是短语内容元素。 Any phrasing content can go inside of any flow content.任何短语内容都可以放在任何流内容中。 In addition to this,
<small>
is an inline element , so will not break the flow of the content.除此之外,
<small>
是一个内联元素,因此不会中断内容的流动。
However, keep in mind that <small>
sets the size one size smaller than the default text size on the page, so you may need to adjust it accordingly.但是,请记住
<small>
设置的大小比页面上的默认文本大小小一号,因此您可能需要相应地调整它。 This can be done by nesting <small>
within <small>
, as <small>
is also a valid parent of <small>
itself.这可以通过将
<small>
嵌套在<small>
来完成,因为<small>
也是<small>
本身的有效父级。 Note that there is an equivalent <big>
, though this is obsoleted in favour of CSS' font-size
.请注意,有一个相当于
<big>
,虽然这有利于CSS”的废弃font-size
。
Yes you can, According to Official document also allow it.是的,你可以,根据官方文件也允许它。 https://www.w3.org/MarkUp/html3/footnotes.html
https://www.w3.org/MarkUp/html3/footnotes.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.