Are single quotes allowed in HTML?

html

Solution

This is similar to When did single quotes in HTML become so popular?. Single quotes around attributes in HTML are and always have been permitted by the specification. I don't think any browsers wouldn't understand them.

Problem

I am a big time user of using double quotes in PHP so that I can interpolate variables rather than concatenating strings. As a result, when I am generating HTML I often use single quotes for setting tag fields. For example: ``` $html = "<input type='text' name='address' value='$address'>"; ``` Now this is far more readable to me than either ``` $html = "<input type=\"text\" name=\"address\" value=\"$address\">"; ``` or ``` $html = '<input type="text" name="address" values="' . $address . '">' ; ``` From brief searches I have heard people saying that single quotes for HTML fields is not recognized by EVERY browser. Thus I am wondering what browsers would have problems recognizing single quote HTML?

Original source

Related problems