HTML 5标题中是否可以包含另一个标签(即h1,h2,h3等)? [英] Can another tag be inside a HTML 5 heading (i.e. h1, h2, h3, etc...)?

查看:144
本文介绍了HTML 5标题中是否可以包含另一个标签(即h1,h2,h3等)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I'm not sure about the convention regarding headings in HTML 5 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

这篇关于HTML 5标题中是否可以包含另一个标签(即h1,h2,h3等)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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