You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

HTML规范3.2.5.3节表述存疑:是否应将required改为allowed?

关于HTML规范中透明内容模型表述的疑问

我原本想确认是否允许在<a>元素内嵌套<table>元素,示例代码如下:

<a>
  <table>
    <tr>
      <td>Hello!</td>
    </tr>
  </table>
</a>

网上对此说法不一,于是我查阅了HTML规范:

  • 在§4.5.1 <a>元素章节中提到,<a>元素的内容模型为transparent(透明内容模型);
  • 在3.2.5.3 透明内容模型章节中,该模型的描述为:

[...] the elements required in the part of the content model that is "transparent" are the same elements as required in the part of the content model of the parent [...]

我认为此处使用的"required"一词应为"allowed",因为<a>元素根本没有必填元素,实际问题是哪些元素被允许嵌套其中。我的理解是否正确?

注:本问题并非关注<table>能否嵌套在<a>内,而是聚焦于HTML规范3.2.5.3节是否存在表述错误。

内容的提问来源于stack exchange,提问作者zomega

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.09 15:01:05