可以< small>标签位于HTML5标题内(即h1,h2,h3等)? [英] Can a <small> tag be inside an HTML5 heading (i.e. h1, h2, h3, etc...)?

查看:129
本文介绍了可以< small>标签位于HTML5标题内(即h1,h2,h3等)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定HTML5中有关标题的约定,但我想知道是否可以在< h3> 中添加< small> ,就像这样(这可能适用于任何标题标签内的任何标签):

I'm not sure about the convention regarding headings in HTML5, but I wanted to know if I could add a <small> in a <h3>, like this (this could apply to any tag inside any heading tags):

<h3>Payment details <small>(this is your default card)</small></h3>

推荐答案

是的,该标记有效.您可以在 http://validator.w3.org/

Yes, that markup validates. You can check it yourself on http://validator.w3.org/

HTML5需要注意的一点是对块级元素概念的更改:

Something to be aware of with HTML5 though is a change to the notion of block-level elements: https://developer.mozilla.org/en/HTML/Block-level_elements

这篇关于可以&lt; small&gt;标签位于HTML5标题内(即h1,h2,h3等)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆