gpt4 book ai didi

html - 在 HTML5 中将 table 元素放入 list 元素中是否有效?

转载 作者:搜寻专家 更新时间:2023-10-31 02:24:59 24 4
gpt4 key购买 nike

所以这是个问题,我可以这样做吗:

<li><table></table></li>

我无法检查 W3,因为它在我的工作场所被禁用...

最佳答案

您不一定需要向 W3 查询此类信息。 Mozilla Developer Network 是一个很好的资源,里面充满了关于标准和兼容性的信息。例如, <li> elements 的页面描述如下(强调我的):

Content categories: None.
Permitted content: Flow content.

甚至还有一个 section describing flow content :

Elements belonging to the flow content category typically contain text or embedded content. They are: <a>, <abbr>, <address>, <article>, <aside>, <audio>, <b>, <bdo>, <blockquote>, <br>, <button>, <canvas>, <cite>, <code>, <command>, <datalist>, <del>, <details>, <dfn>, <div>, <dl>, <em>, <embed>, <fieldset>, <figure>, <footer>, <form>, <h1>, <h2>, <h3>, <h4>, <h5>, <h6>, <header>, <hgroup>, <hr>, <i>, <iframe>, <img>, <input>, <ins>, <kbd>, <keygen>, <label>, <map>, <mark>, <math>, <menu>, <meter>, <nav>, <noscript>, <object>, <ol>, <output>, <p>, <pre>, <progress>, <q>, <ruby>, <samp>, <script>, <section>, <select>, <small>, <span>, <strong>, <sub>, <sup>, <svg>, <table>, <textarea>, <time>, <ul>, <var>, <video>, <wbr> and Text.

因此,这些页面告诉我们 <table><li> 中确实有效.当然,您也可以在 HTML 规范的镜像中找到这些信息,我只是觉得 MDN 导航起来要快一些。

关于html - 在 HTML5 中将 table 元素放入 list 元素中是否有效?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17588528/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com