Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It is valid in HTML4/5 as long as their are no spaces in the value. It is not valid in XHTML though it is still properly rendered on some (all?) browsers.</p> <p>Using a quick sample HTML doc (at end of answer), I tested this with Firefox 3.5 Beta 4, Google Chrome 2, and IE 7. The sample doc was also tested with HTML 4 Strict, HTML 4 Transitional, HTML 5, and XHTML doc types. All were rendered successfully.</p> <p>Some other things to consider... </p> <p>Many modern browsers attempt to render pages in standards compliant mode. If you're trying to use XHTML, and you use unquoted values, browsers will revert back to quirks mode, possibly affecting the rendering of your otherwise standards compliant documents. As browsers become more and more standards compliant as well, future specs may look to deprecate unquoted values.</p> <p>Additionally, in some web frameworks, applications may be parsing templates prior to serving them up. Again, if these parsers are expecting valid XHTML, this type of thing could cause failures.</p> <p>As long as you are sticking to HTML and not XHTML you should be fine without quotes, but there is no guarantee what will happen with XHTML browser to browser. Adding quotes seems like a small cost and keeps your code generally in line with standards for the future.</p> <pre><code>&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;No Quotes Test&lt;/title&gt; &lt;/head&gt; &lt;body&gt; &lt;input type="text" value="with/quotes and spaces" &gt;&lt;/input&gt; &lt;input type=text value=no/quotes and spaces &gt;&lt;/input&gt; &lt;input type=text value=no/quotes_no_spaces &gt;&lt;/input&gt; &lt;/body&gt; &lt;/html&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload