HTML Comments inside Opening Tag of the Element(元素开始标签内的 HTML 注释)
问题描述
当我尝试这个时
<option disabled = "disabled" <!-- Used to disable any particular option -->
selected = "selected" <!-- Used to pre-select any particular option -->
label = "string" <!-- Used to provide a short version of the content in the option -->
value = "value"> <!-- The actual value that will be send to the server. If omitted the content between the option opening and closing tags will be send. -->
Option 1
</option>
我试图在元素的开始标签内注释属性和值.但是,这不起作用,因为浏览器(在 IE9、FF4.01、GG11、AF5 和 Opera11 上测试)将 disabled="disabled" 之后的所有内容视为评论或内容.
I am trying to comment the attributes and values inside the openning tag of the element. However this does not work as browsers (tested on IE9, FF4.01, GG11, AF5 and Opera11) treat everything followed after the disabled="disabled" as either comment or content.
HTMl Comments 是否不允许在元素的开始标签内?
Are HTMl Comments not allowed inside the opening tag of elements?
推荐答案
HTML 注释根本不允许在 inside 标签内,无论是开始还是结束.
HTML comments are not allowed inside tags, start or end, at all.
这篇关于元素开始标签内的 HTML 注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:元素开始标签内的 HTML 注释


- Quasar 2+Apollo:错误:找不到ID为默认的Apollo客户端。如果您在组件设置之外,请使用ProvideApolloClient() 2022-01-01
- 400或500级别的HTTP响应 2022-01-01
- Css:将嵌套元素定位在父元素边界之外一点 2022-09-07
- addEventListener 在 IE 11 中不起作用 2022-01-01
- Fetch API 如何获取响应体? 2022-01-01
- 如何使用 JSON 格式的 jQuery AJAX 从 .cfm 页面输出查 2022-01-01
- Flexslider 箭头未正确显示 2022-01-01
- 使用RSelum从网站(报纸档案)中抓取多个网页 2022-09-06
- 失败的 Canvas 360 jquery 插件 2022-01-01
- CSS媒体查询(最大高度)不起作用,但为什么? 2022-01-01