< a>中可包含哪些元素?标签? [英] What elements can be contained within a <a> tag?
问题描述
< a>
标签中的有效html元素? < a> ?? < / A>
通常,块级元素
可以包含内联元素和其他
块级元素。通常,
内联元素可能只包含数据
和其他内联元素。
固有的结构区别是
的概念,块元素创建
更大的结构,而不是内联
元素。
从 http://www.w3.org /TR/html401/struct/global.html
正如其他答案中所指出的,您不能在 a
在
a
中。
My google fu is not up to scratch this evening. What are the valid html elements, if any, that can be contained within a <a>
tag?
<a> ?? </a>
Inline elements ( a, span, strong, em
among others ) can contain other inline elements and text nodes. An anchor can contain a span, which can contain a text node.
Generally, block-level elements may contain inline elements and other block-level elements. Generally, inline elements may contain only data and other inline elements. Inherent in this structural distinction is the idea that block elements create "larger" structures than inline elements.
From http://www.w3.org/TR/html401/struct/global.html
As noted in other answers, you can't nest an a
in an a
.
这篇关于< a>中可包含哪些元素?标签?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!