<legend id='R12pW'><style id='R12pW'><dir id='R12pW'><q id='R12pW'></q></dir></style></legend>
      <i id='R12pW'><tr id='R12pW'><dt id='R12pW'><q id='R12pW'><span id='R12pW'><b id='R12pW'><form id='R12pW'><ins id='R12pW'></ins><ul id='R12pW'></ul><sub id='R12pW'></sub></form><legend id='R12pW'></legend><bdo id='R12pW'><pre id='R12pW'><center id='R12pW'></center></pre></bdo></b><th id='R12pW'></th></span></q></dt></tr></i><div id='R12pW'><tfoot id='R12pW'></tfoot><dl id='R12pW'><fieldset id='R12pW'></fieldset></dl></div>
      • <bdo id='R12pW'></bdo><ul id='R12pW'></ul>
      <tfoot id='R12pW'></tfoot>

      <small id='R12pW'></small><noframes id='R12pW'>

        XML/HTML 标记内的空白

        时间:2023-07-31
          <tbody id='V9mFA'></tbody>

      1. <tfoot id='V9mFA'></tfoot>
        <i id='V9mFA'><tr id='V9mFA'><dt id='V9mFA'><q id='V9mFA'><span id='V9mFA'><b id='V9mFA'><form id='V9mFA'><ins id='V9mFA'></ins><ul id='V9mFA'></ul><sub id='V9mFA'></sub></form><legend id='V9mFA'></legend><bdo id='V9mFA'><pre id='V9mFA'><center id='V9mFA'></center></pre></bdo></b><th id='V9mFA'></th></span></q></dt></tr></i><div id='V9mFA'><tfoot id='V9mFA'></tfoot><dl id='V9mFA'><fieldset id='V9mFA'></fieldset></dl></div>
          • <bdo id='V9mFA'></bdo><ul id='V9mFA'></ul>
            <legend id='V9mFA'><style id='V9mFA'><dir id='V9mFA'><q id='V9mFA'></q></dir></style></legend>

          • <small id='V9mFA'></small><noframes id='V9mFA'>

                  本文介绍了XML/HTML 标记内的空白的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  我知道在 XML 和 HTML 的文本节点中如何处理空白,但我不确定标签元素本身内部的空白.显然,标签内使用空格来分隔属性,但是在'<'之后有空格是否有效还是在'>'之前?

                  I know how white space is handled in text nodes for XML and HTML, but I'm uncertain about white spaces inside tag elements themselves. Obviously, white spaces are used inside tags to separate attributes, but is it valid to have white spaces after '<' or before '>'?

                  例如:

                  <  foo  >
                  < /foo >
                  

                  甚至:

                  <foo>
                  < /  foo >
                  

                  这些标签是有效的 XML 吗?假设它们是实际的 HTML 标记名称,那么 HTML 呢?

                  Are these tags valid XML? What about HTML, assuming they were actual HTML tag names?

                  推荐答案

                  规范(第 3.1 节开始标签、结束标签和空元素标签) 说 '<' 和标签名称之间没有空格,在 '</' 和标签名称,或在 '/>' 内.不过,您可以在标签名称后添加空格:

                  The specification (section 3.1 Start-tags, end-tags, and empty-element tags) says that there is no white space between the '<' and the tag name, between '</' and the tag name, or inside '/>'. You can add white space after the tag name, though:

                  <foo            >
                  </foo        >
                  <bar
                  />
                  

                  这篇关于XML/HTML 标记内的空白的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:&lt;b&gt;和 &lt;i&gt;标签曾经被弃用吗? 下一篇:HTML5 中的自闭合标签(空元素)

                  相关文章

                  1. <tfoot id='UyMJ2'></tfoot>

                    <small id='UyMJ2'></small><noframes id='UyMJ2'>

                      <bdo id='UyMJ2'></bdo><ul id='UyMJ2'></ul>
                    1. <i id='UyMJ2'><tr id='UyMJ2'><dt id='UyMJ2'><q id='UyMJ2'><span id='UyMJ2'><b id='UyMJ2'><form id='UyMJ2'><ins id='UyMJ2'></ins><ul id='UyMJ2'></ul><sub id='UyMJ2'></sub></form><legend id='UyMJ2'></legend><bdo id='UyMJ2'><pre id='UyMJ2'><center id='UyMJ2'></center></pre></bdo></b><th id='UyMJ2'></th></span></q></dt></tr></i><div id='UyMJ2'><tfoot id='UyMJ2'></tfoot><dl id='UyMJ2'><fieldset id='UyMJ2'></fieldset></dl></div>
                    2. <legend id='UyMJ2'><style id='UyMJ2'><dir id='UyMJ2'><q id='UyMJ2'></q></dir></style></legend>