在HTML属性中,何时使用逗号,何时使用空格

在HTML属性中,何时使用逗号,何时使用空格,html,Html,因此,在HTML属性中,何时使用逗号以及何时使用空格没有一般规则。它取决于html元素/属性 其他例子: <frameset cols="25%,75%"></frameset> <!-- comma --> <input type="text" form="first second three" /> <!-- space --> <input type="file" accept="image/gif, image/jpeg

因此,在HTML属性中,何时使用逗号以及何时使用空格没有一般规则。它取决于html元素/属性

其他例子:

<frameset cols="25%,75%"></frameset> <!-- comma -->
<input type="text" form="first second three" />  <!-- space -->
<input type="file" accept="image/gif, image/jpeg" />  <!-- comma -->
<div class="a b c d">   <!-- space -->

大多数情况下,我们需要学习使用哪一种元素

本质上,应将逗号分隔作为<强>和>语句,并将空间作为<强>或>语句。在

中,您希望上载同时允许文件
.gif
.jpeg
文件。在
中,您希望声明应用于类的任何

请注意,HTML5中的所有都不支持
,因此您应该避免完全使用它;)

希望这有帮助!:)

<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">